Created
April 2, 2017 21:41
-
-
Save carlosble/ba0a2d955a018dc91e3fa507fd49383e to your computer and use it in GitHub Desktop.
typical index of a react-redux app
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 {render} from 'react-dom'; | |
import {Provider} from 'react-redux'; | |
import {Router, browserHistory} from 'react-router'; | |
import routes from './routes'; | |
import configureStore from './store/configureStore'; | |
import {syncHistoryWithStore} from 'react-router-redux'; | |
const store = configureStore(); | |
const history = syncHistoryWithStore(browserHistory, store); | |
render( | |
<Provider store={store}> | |
<Router history={history} routes={routes}/> | |
</Provider>, document.getElementById('app') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment