There is a discrepency between window.location.search and the search params used by the router when using hash routes.
To see it in action start the project pnpm run dev
and go to the following routes:
- About with react router search params
- About with window.location.search params
- About with both params
According to the specification the query must come before the fragment:
https://www.rfc-editor.org/rfc/rfc3986#section-3
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]