Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const appReducers = {
routing: routerReducer,
rails: () => railsContext
}
if (isClientSide) {
const sagaMiddleware = createSagaMiddleware()
const finalCreateStore = compose(
applyMiddleware(sagaMiddleware),
applyMiddleware(routerMiddleware(browserHistory)),
window.devToolsExtension ? window.devToolsExtension() : f => f
)(createStore)
const store = createKeaStore(finalCreateStore, appReducers)
sagaMiddleware.run(createRootSaga(appSaga))
const history = syncHistoryWithStore(browserHistory, store)
// TODO: check why do we need to do this?
match({routes: getRoutes(Layout, store, routes), location: railsContext.location}, () => {})
store.dispatch(initFromProps(props))
// custom scenes
store.addKeaScene(headerScene, true)
return (
)