Connected-react-router: Un-compatibility with react-router@^5.0.0

Created on 9 Apr 2019  路  7Comments  路  Source: supasate/connected-react-router

I just try on react-router@^5.0.0 with connected-react-router@^6.3.2, it seem to be un-compatibility. didn't pass router store to child component.

After downgrade react-router and react-router-dom pacakge version (@^4.3.4) everything working fine again.

铻㈠箷蹇収 2019-04-01 涓嬪崍6 21 08

I'm trying to fix this issue and PR (If i'm not too busy), looking for any reply.

_Originally posted by @genexu in https://github.com/supasate/connected-react-router/pull/273#issuecomment-478523354_

Most helpful comment

I can't fully say what fixed it, but I deleted my package-lock.json and reinstalled (fixed some new bugs that were introduced) but then got this working.

All 7 comments

When I ran into this, it was because react router and react router dom did not have the exact same version. Double check you did.

I'm having a similar error. I resolved the You should not use <X> outside a <Router> for <Route>, <Switch>, <Redirect> by changing my imports from react-router-dom to react-router, however I can't figure out how to resolve the error for <Link>s

Versions:

"connected-react-router": "^6.3.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.1",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"redux": "^4.0.1",

Can you do a yarn why or npm version to check the version of react-router and react-router-dom? Make sure not multiple version is installed. You can also remove node_modules and reinstall.

They're definitely the same version. Just did a clear out and reinstall of node_modules and am having the same error

image

I can't fully say what fixed it, but I deleted my package-lock.json and reinstalled (fixed some new bugs that were introduced) but then got this working.

I ran into the same error for <Link>, and what worked for @thehig also worked for me.

i too had to delete package-lock and reinstall to get it to work

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjdp picture jjdp  路  4Comments

hauptrolle picture hauptrolle  路  3Comments

abeledovictor picture abeledovictor  路  3Comments

dcs3spp picture dcs3spp  路  3Comments

alexseitsinger picture alexseitsinger  路  3Comments