connected-react-router
connected-react-router copied to clipboard
Support react router 6
Do you have any plans to support 6 version? Do you need any help? https://reactrouter.com
Looks like #438 is aimed at doing that but has been left alone, I may apply that as a patch to the latest version myself to resolve the immediate issue
After upgrade react-router-dom 5.3.0 to 6.0.0 i have error.
Cannot read properties of undefined (reading 'pathname')

Is It problem in connected-react-router or not?
Switch to redux-first-history: https://github.com/salvoravida/redux-first-history support react-router v6 and is issues-free!
Switch to redux-fist-history: https://github.com/salvoravida/redux-first-history support react-router v6 and is issues-free!
Thanks! I'll play with it.
@Iuriy-Budnikov Could you write after your result after migrate
Switch to redux-fist-history: https://github.com/salvoravida/redux-first-history support react-router v6 and is issues-free!
Thanks! I'll play with it.
Great, looking forward to your feedback!
@salvoravida @Iuriy-Budnikov I moved to redux-first-history and all good works as excepted. Migration was smooth.
@salvoravida @Iuriy-Budnikov I moved to redux-first-history and all good works as excepted. Migration was smooth.
update to 5.0.2 that fixes support for react-router 6.0.2 while waiting for this official Pull Request https://github.com/remix-run/react-router/pull/7586
let me know your feedback!
@salvoravida Updated to 5.0.2 and react router 6.0.2 all good
Same as #397
Hey @salvoravida, Thanks. I switched successfully.
I have the same problem, I think it does not support react-router V6
I have a same problem ant that case is with interfaces.
RouterLocation<S> extends Location<S>
Problem that extending Location interface with not a generic and passing S generic from RouterLocation. At this moment, that breaks Location interface and we lost all Location properties.
export interface RouterLocation<S> extends Location<S> {
query: Record<string, string>
}
export interface RouterState<S = LocationState> {
location: RouterLocation<S>
action: RouterActionType
}
Switch to redux-first-history: https://github.com/salvoravida/redux-first-history support react-router v6 and is issues-free!
Just tried it now, It's great and loved the clear guides ❤️!
@lovewinders @zygimantas-gylys
You can try https://github.com/lagunovsky/redux-react-router
Requires react-router v6 and history v5
API like for the connected-react-router
@supasate is it fair to assume there will be no updates to this package going forward?
New React/Redux project here totally dependent on react-router-dom v6. Successfully switched to redux-first-history and that solved the issue! Thanks for the tip!!
Hi everyone,
I'm still strugling myself on this Cannot read properties of undefined (reading 'pathname') console error.
I've followed the migration v6 guide here : https://github.com/remix-run/react-router/blob/main/docs/upgrading/v5.md#upgrade-to-react-router-v6
I've update all my yarn packages such as React and react-dom (18.1.0), react-router and react-router-dom (6.3.0) and I'm always getting the exact same error in my console when I lauch my app with react-scripts start !
Does anyone can help me please ?
The PR has been created 1 year ago. WTF ? https://github.com/supasate/connected-react-router/pull/438