Created
April 6, 2016 19:49
-
-
Save nitaliano/abec54af27b8d1cc832a68669be8ebb7 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 configureStore from './store'; | |
import routes from './routes'; | |
import { Provider } from 'react-redux'; | |
import { Router, browserHistory } from 'react-router'; | |
import { syncHistoryWithStore } from 'react-router-redux'; | |
window.addEventListener('DOMContentLoaded', () => { | |
const $el = document.getElementById('app'); | |
const store = configureStore(); | |
const history = syncHistoryWithStore(browserHistory, store); | |
ReactDOM.render( | |
<Provider store={store}> | |
<Router history={history} routes={routes} /> | |
</Provider>, $el); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment