Cannot read property 'getCurrentLocation' of undefined after upgrade from 0.x to 3.0
After updating from 0.x to 3.0.0 i am getting error:
Cannot read property 'getCurrentLocation' of undefined in Router.js file.
Line that is causing that issue in Router.js file is:
!history.getCurrentLocation ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You have provided a history object created with history v2.x or ' + 'earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please upgrade to history v3.x.') : (0, _invariant2.default)(false) : void 0;
Did you update the history module to v3?
Ah, yes. Thanks. But i found out that 2.8.1 works fine with older history module.
same problem:
"react-router": "^3.0.2", "history": "^4.5.1",
@huanghaiyang Your history should be at version 3.5.1 if you're using react-router 3.0.2.
You are not passing a history to your
<Router history={hashHistory}>