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

Fixed React Router 6 support #438

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

phistuck
Copy link

This is an exploratory fix. It works, but I am not sure it is the right way to go.

@phistuck phistuck mentioned this pull request Jul 28, 2020
@whazor
Copy link

whazor commented Feb 15, 2021

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) => {

@phistuck
Copy link
Author

@whazor - hmmm, how is that different (it is already an object)? Unless I am blind, you just removed two line breaks...

@whazor
Copy link

whazor commented Feb 15, 2021

Ahhhh.. I applied your PR as patch to the latest version. But you are actually changing the dev branch.

@ayxos
Copy link

ayxos commented Nov 9, 2021

What is the status of this?

@whazor
Copy link

whazor commented Nov 10, 2021

I can recommend looking at redux-first-history or lagunovsky/redux-react-router

@Ali-Aref
Copy link

Ali-Aref commented Jan 8, 2022

Please merge this or update the connected-react-router to support v6

@tomtom94
Copy link

tomtom94 commented Oct 10, 2022

@supasate just click the button Merge !

@Bender101
Copy link

go merge bro

@red17electro
Copy link

Hey folks, can we expect that it is going to be merged anytime soon?

@dhruvik077
Copy link

Please merge this.. 😭

@tomtom94
Copy link

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

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

Successfully merging this pull request may close these issues.

8 participants