@@ -14,21 +14,17 @@ import {
1414import { bindActionCreators } from 'redux' ;
1515import { utils , create , saga , createDvaReact18Enhancer } from 'modernx-core' ;
1616import * as router from 'react-router-dom' ;
17- import * as routerRedux from 'connected-react- router' ;
17+ import { createRouterMiddleware } from './ router-middleware ' ;
1818import * as routerV6Compat from './router-v6-compat' ;
1919
20- const { connectRouter, routerMiddleware } = routerRedux ;
2120const { isFunction } = utils ;
2221const { useHistory, useLocation, useParams, useRouteMatch } = router ;
2322
2423export default function ( opts = { } ) {
2524 const history = opts . history || createHashHistory ( ) ;
2625 const createOpts = {
27- initialReducer : {
28- router : connectRouter ( history ) ,
29- } ,
3026 setupMiddlewares ( middlewares ) {
31- return [ routerMiddleware ( history ) , ...middlewares ] ;
27+ return [ createRouterMiddleware ( history ) , ...middlewares ] ;
3228 } ,
3329 setupApp ( app ) {
3430 app . _history = patchHistory ( history ) ;
@@ -150,7 +146,6 @@ export { connect, connectAdvanced, useSelector, useDispatch, useStore, shallowEq
150146export { bindActionCreators } ;
151147export { router } ;
152148export { saga } ;
153- export { routerRedux } ;
154149export { createBrowserHistory , createMemoryHistory , createHashHistory } ;
155150export { useHistory , useLocation , useParams , useRouteMatch } ;
156151export {
0 commit comments