-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.tsx
29 lines (27 loc) · 1.08 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App.connect';
import * as serviceWorker from './serviceWorker';
import { store, history } from './state-mgmt/store/index';
import { Provider } from 'react-redux';
import { Switch, Route } from 'react-router-dom';
import { ConnectedRouter } from 'connected-react-router';
import { Home } from './pages/home/Home';
// entry point to attach react app to root of the element
// Also point of linkage for redux store and react-router definitions
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Route exact path='/' component={App} />
<Route path="/home" component={Home} />
</Switch>
</ConnectedRouter>
</Provider>,
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();