🎉 Initial Commit
This commit is contained in:
32
src/index.js
32
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();
|
||||
|
||||
Reference in New Issue
Block a user