Created
November 3, 2015 19:33
-
-
Save lesniakania/b96e8f20bfe55f98eaa7 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 { Provider } from 'react-redux'; | |
import { reduxReactRouter, ReduxRouter } from 'redux-router'; | |
import Routes from './routes'; | |
import { configureStore } from './Store'; | |
import createHistory from 'history/lib/createBrowserHistory' | |
var app = document.getElementById('app'); | |
// here we can use now __INITIAL_STATE__ from server | |
const initialState = window.__INITIAL_STATE__; | |
const store = configureStore(initialState, createHistory, reduxReactRouter); | |
ReactDOM.render( | |
<Provider store={store}> | |
<ReduxRouter routes={Routes} /> | |
</Provider>, | |
app | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment