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
I just meant it looks like a typo. V1 is over a decade old, so I assume that's not what you're using.
In this case, this is expected behavior for that kind of router. It has to encode the query string into the hash so it can adjust it without reloading the page. If you switch to another router type, it will behave as expected.
What version of React Router are you using?
react-router-dom 1.23.1
Steps to Reproduce
const location = useLocation();
console.log(location.search);
when url is 'https://issac.test.com/index.html?region=test&wenben=test#/management/content-mgr/test', location.search return ''. looks like a bug. And when using 'new URLSearchParams(location.href)',return ok
when url is 'https://issac.test.com/index.html#/management/content-mgr/test?region=test&wenben=test', location.search return '?region=test&wenben=test'. looks OK
Expected Behavior
the return value is not balnk as normal, no matter the order of # an ?
Actual Behavior
when url is 'https://issac.test.com/index.html?region=test&wenben=test#/management/content-mgr/test', location.search return ''. looks like a bug. And when using 'new URLSearchParams(location.href)',return ok
The text was updated successfully, but these errors were encountered: