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

Is connected-react-router compatible with react 18? #578

Open
chris-tuncap opened this issue Jun 22, 2022 · 8 comments
Open

Is connected-react-router compatible with react 18? #578

chris-tuncap opened this issue Jun 22, 2022 · 8 comments

Comments

@chris-tuncap
Copy link

Is the latest version (6.9.2) compatible with react 18?

@D3Pheonix
Copy link

i think yes, but it's not compatible with router v6 (

@petatemarvin26
Copy link

petatemarvin26 commented Jul 14, 2022

The alternative one redux-first-history, it is compatible to react-router@v6 but if you are still wanted to use connected-react-router you need to downgrade your react-router to v5

@N1mi1
Copy link

N1mi1 commented Jul 14, 2022

ATM you can see package.json

"peerDependencies": { "history": "^4.7.2", "react": "^16.4.0 || ^17.0.0", "react-redux": "^6.0.0 || ^7.1.0", "react-router": "^4.3.1 || ^5.0.0", "redux": "^3.6.0 || ^4.0.0" },

So it seems that no.
Also when you run npm i connected-react-router you get an error:
npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.4.0 || ^17.0.0" from connected-react-router@6.9.3

@rajputanax
Copy link

can we use router 4.3.2 with react 18

@0bx
Copy link

0bx commented Nov 27, 2022

For React 18 / Router 6 / Redux 8 setup one may use another library: https://github.com/lagunovsky/redux-react-router
which is compatible with connected-react-router APIs.

@VivekTiwari97
Copy link

I'm stuck in same propblem, using ract 18.3 , when try to npm i getting error
Could not resolve dependency:
npm ERR! peer react@"^16.4.0 || ^17.0.0" from connected-react-router@6.9.3
npm ERR! node_modules/connected-react-router
npm ERR! connected-react-router@"^6.9.3" from the root project

@VivekTiwari97
Copy link

what is solution, should i go to previous version of "connect-react-router", or previous version of react.?

@petatemarvin26
Copy link

The alternative one redux-first-history, it is compatible to react-router@v6 but if you are still wanted to use connected-react-router you need to downgrade your react-router to v5

I update my answer

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

7 participants