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

[Bug]: MemoryRouter looses state of initial entries in v6.4.0 #9265

Closed
ddolcimascolo opened this issue Sep 15, 2022 · 8 comments · Fixed by #9288
Closed

[Bug]: MemoryRouter looses state of initial entries in v6.4.0 #9265

ddolcimascolo opened this issue Sep 15, 2022 · 8 comments · Fixed by #9288
Assignees
Labels

Comments

@ddolcimascolo
Copy link

ddolcimascolo commented Sep 15, 2022

What version of React Router are you using?

6.4.0

Steps to Reproduce

See the Sandbox at https://codesandbox.io/s/react-router-issue-9265-p8nx49 and simply downgrade react-router-dom to v6.3.0 to see the state value being rendered.

Expected Behavior

MemoryRouter does not loose state of initial entries.

Actual Behavior

MemoryRouter looses state of initial entries.

@ddolcimascolo
Copy link
Author

This breaks Jest tests basically, where we use <MemoryRouter />.
The production application use <BrowserRouter /> is not impacted and works fine in v6.4.0.

@ddolcimascolo
Copy link
Author

Am I the only one blocked by this?

Remix team, do you think this is something that can be fixed by someone that has never contributed to react-router? :)

@CarloHagens
Copy link

We are experiencing the same issue where we use the memory router with some initial state within our cypress component tests.

@ddolcimascolo
Copy link
Author

@timdorr I saw your answer in #9273. Any chance this regression has the same cause?

@brophdawg11
Copy link
Contributor

Thanks for the bug report and reproduction! Pushed a fix for this in #9288 and we should be able to get a patch out early this week 👍

@ddolcimascolo
Copy link
Author

@brophdawg11 Is a release still planned this week?

@ddolcimascolo
Copy link
Author

Thx for the release!

@brophdawg11
Copy link
Contributor

👍 let us know if you run into any issues in 6.4.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants