We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
6.17.0
Consider url http://localhost:3000/?location=xx&room=yy#/view
http://localhost:3000/?location=xx&room=yy#/view
The hook can't see parameters when the broser api url.searchParams can parse them.
url.searchParams
note: everything is ok for http://localhost:3000/#/view?location=xx&room=yy
http://localhost:3000/#/view?location=xx&room=yy
const [searchParams] = useSearchParams(); console.log(searchParams.has("room")) // returns TRUE const url = new URL(window.location.href); console.log(url.searchParams.has("room")) // returns TRUE
const [searchParams] = useSearchParams(); console.log(searchParams.has("room")) // returns FALSE const url = new URL(window.location.href); console.log(url.searchParams.has("room")) // returns TRUE
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What version of React Router are you using?
6.17.0
Steps to Reproduce
Consider url
http://localhost:3000/?location=xx&room=yy#/view
The hook can't see parameters when the broser api
url.searchParams
can parse them.note: everything is ok for
http://localhost:3000/#/view?location=xx&room=yy
Expected Behavior
http://localhost:3000/?location=xx&room=yy#/view
Actual Behavior
http://localhost:3000/?location=xx&room=yy#/view
The text was updated successfully, but these errors were encountered: