aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorIndrajith K L2019-12-11 18:54:05 +0530
committerIndrajith K L2019-12-11 18:54:05 +0530
commit8988233da897e8447a1dbdb700836fb8576e5e6b (patch)
tree0bcaaf9657f35320ea110085ed0c40f815100a55 /src/index.js
parent53e5edb3d93d957f82034be43940d560540525a8 (diff)
downloadreact-redux-saga-starter-8988233da897e8447a1dbdb700836fb8576e5e6b.tar.gz
react-redux-saga-starter-8988233da897e8447a1dbdb700836fb8576e5e6b.tar.bz2
react-redux-saga-starter-8988233da897e8447a1dbdb700836fb8576e5e6b.zip
:tada: Initial Commit
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js
index 87d1be5..a3b342f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,12 +1,36 @@
import React from 'react';
import ReactDOM from 'react-dom';
+import "bootstrap/dist/css/bootstrap.min.css";
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
+import { history, configureStore } from './core/store';
+import rootMiddleware from './middlewares/root.middleware';
+import {
+ BrowserRouter as Router,
+ Route
+ } from "react-router-dom";
+import Routes from './core/routes';
+
+require("es6-promise").polyfill();
+
+
+
+const store = configureStore();
+store.runSaga(rootMiddleware);
+
+const XRouter = () => {
+ return (
+ <Router>
+ <Route>
+ <Routes store={store} history={history} />
+ </Route>
+ </Router>
+ );
+ };
+
+
+ ReactDOM.render(<XRouter />, document.getElementById('root'));
-ReactDOM.render(<App />, document.getElementById('root'));
-// If you want your app to work offline and load faster, you can change
-// unregister() to register() below. Note this comes with some pitfalls.
-// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();