/router-test

Primary LanguageTypeScript

React router hash route search issues

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:

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 ]