connected-react-router
connected-react-router copied to clipboard
Fixed React Router 6 support
This is an exploratory fix. It works, but I am not sure it is the right way to go.
Due to the new history v5, listen history.listen became the following object instead of separate parameters: {location, action}. To fix this change line 62 on ConnectedRouter.js to:
const handleLocationChange = ({location, action}, isFirstRendering = false) => {
@Whazor - hmmm, how is that different (it is already an object)? Unless I am blind, you just removed two line breaks...
Ahhhh.. I applied your PR as patch to the latest version. But you are actually changing the dev branch.
What is the status of this?
I can recommend looking at redux-first-history or lagunovsky/redux-react-router
Please merge this or update the connected-react-router to support v6
@supasate just click the button Merge !
go merge bro
Hey folks, can we expect that it is going to be merged anytime soon?
Please merge this.. 😭
You don't need this module anymore, it is useless.
Just use the brand new React Router 6 hooks like useLocation, useNavigate, useParams etc... wherever you need it in your page.
I recommend you to take a look at this boilerplate repository for an app ready to go https://github.com/tomtom94/react-easy-ssr