You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to react-router 6.7.0 we are no longer able to trigger a location change (useLocation()) by passing a value to window.location.hash. This used to work but now we get the following in the log:
"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."
Which indicates that it's related to this PR #9709
Is there any way we can fall back to the old behaviour where we could modify the window.location.hash and have that trigger a location change?
No, because we need to manage the history via our APIs to avoid several edge case conditions where it fails when using methods outside of the library's control.
Hi!
After upgrading to react-router 6.7.0 we are no longer able to trigger a location change (useLocation()) by passing a value to window.location.hash. This used to work but now we get the following in the log:
"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."
Which indicates that it's related to this PR #9709
Is there any way we can fall back to the old behaviour where we could modify the window.location.hash and have that trigger a location change?
Originally posted by @poserdonut in #9973
The text was updated successfully, but these errors were encountered: