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

Multiple BrowserRouter instances breaks NavigationPrompt #77

Closed
mellis481 opened this issue Aug 18, 2021 · 1 comment
Closed

Multiple BrowserRouter instances breaks NavigationPrompt #77

mellis481 opened this issue Aug 18, 2021 · 1 comment

Comments

@mellis481
Copy link

If there are multiple BrowserRouter instances, NavigationPrompt doesn't work as expected.

https://oq16x.csb.app/sub/route1

  1. Dirty form
  2. Clicking the "Go to test" link works
  3. Clicking the "Go to test (top-level)" link does not work
@ZacharyRSmith
Copy link
Owner

Thanks for the reproducing example!

I would not expect NavigationPrompt to work with multiple BrowserRouters. In your example, I change NavigationPrompt to react-router's Prompt, and it didn't work either. I just updated the README to call this out. Please reopen if it makes sense to.

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

No branches or pull requests

2 participants