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

set initial memory history key to "default" #951

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

fmauquie
Copy link

Documentation states that the initial entry always has key "default". However on memory history this is not the case.

We check that the key is "default" to set a default behavior when the user clicks a "back" button to go back to home, but arrived at the page from a direct link. This works perfectly in the browser, but failed in the test because the key was not "default" on MemoryRouter.

Documentation states that the initial entry always has key `"default"`. However on memory history this is not the case.

We check that the key is `"default"` to set a default behavior when the user clicks a "back" button to go back to home, but arrived at the page from a direct link. This works perfectly in the browser, but failed in the test because the key was not "default" on MemoryRouter.
@Nantris
Copy link

Nantris commented Sep 1, 2022

I hope this could get merged soon. There are various, now rather long-standing, but extremely simple issues with MemoryHistory which don't seem to be moving forward, which makes upgrading to React Router 6 impossible, which breaks React.StrictMode. It's a cascade of consequences from like eight lines of missing code between this issue and #939.

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.

None yet

2 participants