import routes from './Routes' import { configureStore } from './store' const { document } = window const initialState = JSON.parse(document.getElementById('initial-state').innerHTML) const store = configureStore(initialState) const history = withScroll(browserHistory, (_prevLoc, { hash }) => ( !hash )) const createLocals = (params, { dispatch, getState }) => ({ ...getState(), dispatch, params }) const App = createClientApp({ routes, store, history, createLocals }) render( <App />, document.getElementById('mount') )
import React from 'react' import { render } from 'react-dom' import createClientApp from 'boiler-room-runner/client' import routes from './routes' import './styles.css' const App = createClientApp({ routes }) render(<App />, document.getElementById('app'))