Skip to content

Instantly share code, notes, and snippets.

@moizhb
Created January 17, 2017 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moizhb/f4c9fb93456fac8fa1e3df07bcc647a6 to your computer and use it in GitHub Desktop.
Save moizhb/f4c9fb93456fac8fa1e3df07bcc647a6 to your computer and use it in GitHub Desktop.
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