reactjs/react-router-redux

with react-router 4.X and react-router-redux 5.0, the devTools can not replay different path

kavinforever opened this issue · 3 comments

the dependencies is

   "react-dom": "^15.6.1",
    "react-hot-loader": "^3.0.0-beta.7",
    "react-redux": "^5.0.6",
    "react-router-dom": "^4.2.2",
    "react-router-redux": "^5.0.0-alpha.9",
    "redux": "^3.6.0",

devDependencies is

     "redux-devtools": "^3.0.0-beta-3",
    "redux-devtools-dock-monitor": "^1.0.0-beta-3",
    "redux-devtools-log-monitor": "^1.0.0-beta-3"

the entry file is

import createHistory from 'history/createBrowserHistory';
const history = createHistory();
const store = createStore(history, window.__INITIAL_STATE__);

import { Provider } from 'react-redux';
import { Switch, Route } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import DevTools from '../store/DevTools';

 return (
      <Provider store={store}>
        <div>
          <ConnectedRouter history={history}>
            <Switch>
                  <Route key={newContextPath} component={item.component} path={newContextPath} exact />
            </Switch>
          </ConnectedRouter>
          <DevTools />
        </div>
      </Provider>
    );

the create Store is

import {applyMiddleware, compose, createStore as createReduxStore} from 'redux';
import {routerMiddleware} from 'react-router-redux';
import thunk from 'redux-thunk';
import logger from 'redux-logger';
import DevTools from './DevTools';

 // ======================================================
  const middleware = [thunk, logger, routerMiddleware(history)];

  // ======================================================
  // Store Enhancers
  // ======================================================
  const enhancers = [];
  let composeEnhancers = compose;

  // ======================================================
  // Store Instantiation and HMR Setup
  // ======================================================

  const store = createReduxStore(
   combineReducers({
    user: userReducer,
    router: routerReducer,
    ...asyncReducers
  });
    // initialState,
    composeEnhancers(
      applyMiddleware(...middleware),
      DevTools.instrument(),
      ...enhancers
    )
  );

image

the route->location is changed in store when we change to the different route, but the replay is not working.
http://127.0.0.1 to http://127.0.0.1/count, it stayed in the 'count' path, not return to the index.
image

it seems to me that the state in store is the same with the routers, so i am confused why i cannot get the result ,thanks a lot

by the way ,the action in one page can be replayed on the right way.

Time travel debugging isn't yet supported in 5.0