-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
Description
What version of React Router are you using?
6.7.0
Steps to Reproduce
Using <HashRouter>, when changing the hash route by using window.location, eg. as a user would do when changing the url manually, we get the following warning and no change in route:
"You are trying to block a POP navigation to a location that was not created by @remix-run/router. The block will fail silently in production, but in general you should do all navigation with the router (instead of using window.history.pushState directly) to avoid this situation."
Expected Behavior
As in versions prior to 6.7, a route change should occur.
Actual Behavior
We get the following warning and no change in route:
"You are trying to block a POP navigation to a location that was not created by @remix-run/router. The block will fail silently in production, but in general you should do all navigation with the router (instead of using window.history.pushState directly) to avoid this situation."