[Bug]: HashRouter URL escapes location.hash
as soon as switching to React 18 createRoot while having the ClearURLs Chrome Extension enabled
#8842
Labels
What version of React Router are you using?
6.3.0
Steps to Reproduce
I recently migrated an existing app which uses
HashRouter
to React 18. After switching the application to the new createRoot API (https://reactjs.org/link/switch-to-createroot), the URL routing stops working as something suddenly changes the location.hash value into its URL escaped value.Messages like
router.ts:11 No routes matched location "%2F_%2Foidc%2Fsilent-refresh%3F=
are logged when accessing any of the existing routes.http://localhost:8080/app/#/whatever/route
with React 18 but using the oldReactDOM.render
API. Ensure the browsers URL remains the same when the app loads.createRoot
API and do the same (press browser reload). Now the URL changes ttohttp://localhost:8080/app/#%2Fwhatever%2Froute=
.Expected Behavior
When using React 18 with the new Client Rendering API, the URL routing should not escape the hash part.
Actual Behavior
Hash based URL routing does not work as the browsers URL hash value gets escaped.
The text was updated successfully, but these errors were encountered: