Open chris-tuncap opened 2 years ago
i think yes, but it's not compatible with router v6 (
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
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
can we use router 4.3.2 with react 18
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.
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
what is solution, should i go to previous version of "connect-react-router", or previous version of react.?
any update?
Any updates?
Possible work around till the package is updated use the --legacy-peer-deps
flag
npm i connected-react-router --legacy-peer-deps
or npm i --legacy-peer-deps
But warning this could introduce breaking changes & needs to be tested thoroughly
Is the latest version (6.9.2) compatible with react 18?