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

Hi! #12517

Closed
Mdazharuddin615 opened this issue Dec 11, 2024 · 1 comment
Closed

Hi! #12517

Mdazharuddin615 opened this issue Dec 11, 2024 · 1 comment

Comments

@Mdazharuddin615
Copy link

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

@timdorr
Copy link
Member

timdorr commented Dec 11, 2024

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.

@timdorr timdorr closed this as completed Dec 11, 2024
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