Connected-react-router: Not compatible with history v5?

Created on 18 Jun 2020  路  5Comments  路  Source: supasate/connected-react-router

Hi,

It seems that history v5 has somme breaking changes, and conected-react-router is not compatible with this version.
See issue posted on history repository: https://github.com/ReactTraining/history/issues/803

Most helpful comment

Solution for now, found here;
https://github.com/ReactTraining/history/issues/804#issuecomment-646452641

TL;DR:

yarn add [email protected]

All 5 comments

I found i am getting a Could not find router reducer in state tree, it must be mounted under "router", i traced it down to the missing action prop on the persisted route object, as @readikus mentioned above.

in selectors.js, there is code looking for it when validating if it is a router:

var isRouter = function isRouter(value) {
  return value != null && _typeof(value) === 'object' && getIn(value, ['location']) && getIn(value, ['action']);
};

Solution for now, found here;
https://github.com/ReactTraining/history/issues/804#issuecomment-646452641

TL;DR:

yarn add [email protected]

Solution for now, found here;
ReactTraining/history#804 (comment)

TL;DR:

yarn add [email protected]

Works for me

Is there any roadmap to fix this problem (without downgrade to 4.x)? Or should it be fixed by feature upgrade of history?

This is due to React Router v5 doesn't support history v5.

When adding history v5, it should show a warning that it has incorrect peer dependency.

React Router v6 will support history v5. So, we will upgrade it as well when it's out of beta.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hauptrolle picture hauptrolle  路  3Comments

alexseitsinger picture alexseitsinger  路  3Comments

Hardtack picture Hardtack  路  3Comments

jjdp picture jjdp  路  4Comments

zry754331875 picture zry754331875  路  3Comments