Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-compatibility with react-router@^5.0.0 #288

Closed
genexu opened this issue Apr 9, 2019 · 7 comments
Closed

Un-compatibility with react-router@^5.0.0 #288

genexu opened this issue Apr 9, 2019 · 7 comments

Comments

@genexu
Copy link

genexu commented Apr 9, 2019

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 #273 (comment)

@bugzpodder
Copy link

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.

@thehig
Copy link

thehig commented Apr 10, 2019

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",

@bugzpodder
Copy link

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.

@thehig
Copy link

thehig commented Apr 11, 2019

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

image

@thehig
Copy link

thehig commented Apr 12, 2019

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.

@rpedela
Copy link

rpedela commented May 7, 2019

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

@EdmundMai
Copy link

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

@genexu genexu closed this as completed Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants