Multiple BrowserRouter instances breaks NavigationPrompt
mellis481 opened this issue · 1 comments
mellis481 commented
If there are multiple BrowserRouter
instances, NavigationPrompt
doesn't work as expected.
https://oq16x.csb.app/sub/route1
- Dirty form
- Clicking the "Go to test" link works
- Clicking the "Go to test (top-level)" link does not work
ZacharyRSmith commented
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.