@@ -5,7 +5,8 @@ import 'babel-polyfill';
55import React from 'react' ;
66import ReactDOM from 'react-dom' ;
77import { applyRouterMiddleware , Router , browserHistory , match } from 'react-router' ;
8- import { syncHistoryWithStore } from 'react-router-redux' ;
8+ import { bindActionCreators } from 'redux' ;
9+ import { syncHistoryWithStore , replace } from 'react-router-redux' ;
910import { ReduxAsyncConnect } from 'redux-connect' ;
1011import { AppContainer as HotEnabler } from 'react-hot-loader' ;
1112import { useScroll } from 'react-router-scroll' ;
@@ -53,10 +54,12 @@ Promise.all([window.__data ? true : isOnline(), getStoredState(offlinePersistCon
5354 const store = createStore ( browserHistory , { client, app, restApp } , data , offlinePersistConfig ) ;
5455 const history = syncHistoryWithStore ( browserHistory , store ) ;
5556
57+ const redirect = bindActionCreators ( replace , store . dispatch ) ;
58+
5659 const renderRouter = props => (
5760 < ReduxAsyncConnect
5861 { ...props }
59- helpers = { { client, app, restApp } }
62+ helpers = { { client, app, restApp, redirect } }
6063 filter = { item => ! item . deferred }
6164 render = { applyRouterMiddleware ( useScroll ( ) ) }
6265 />
0 commit comments