connected-react-router icon indicating copy to clipboard operation
connected-react-router copied to clipboard

Is connected-react-router compatible with react 18?

Open chris-tuncap opened this issue 2 years ago • 10 comments

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

chris-tuncap avatar Jun 22 '22 21:06 chris-tuncap

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

D3Pheonix avatar Jul 06 '22 21:07 D3Pheonix

The alternative one redux-first-history, it works on my end without using connected-react-router

petatemarvin26 avatar Jul 14 '22 07:07 petatemarvin26

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: [email protected] 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 [email protected]

N1mi1 avatar Jul 14 '22 15:07 N1mi1

can we use router 4.3.2 with react 18

rajputanax avatar Sep 28 '22 13:09 rajputanax

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.

0bx avatar Nov 27 '22 10:11 0bx