Created
January 17, 2017 20:07
-
-
Save moizhb/f4c9fb93456fac8fa1e3df07bcc647a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import DevTools from './containers/DevTools'; | |
import { Provider } from 'react-redux' | |
import { Router, Route, IndexRoute, browserHistory } from 'react-router' | |
import { syncHistoryWithStore } from 'react-router-redux' | |
import store from './store' | |
import Root from '../containers/Root'; | |
import { NotFoundView, Counter, FooView, BarView } from '../components'; | |
import { SplitLayout, Primary } from '../layouts' | |
import './styles/main.scss'; | |
const history = syncHistoryWithStore(browserHistory, store) | |
ReactDOM.render( | |
<Provider store={store}> | |
<div> | |
<Router history={history}> | |
<Route path="/" component={Root}> | |
<Route component={Primary}> | |
<IndexRoute component={Counter}/> | |
<Route path="foo" component={FooView}/> | |
<Route path="bar" component={BarView}/> | |
<Route path="*" component={NotFoundView} /> | |
</Route> | |
</Route> | |
</Router> | |
</div> | |
</Provider>, | |
document.getElementById('root') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment