-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed as not planned
Closed as not planned
Copy link
Description
I'm using React Router as a...
library
Reproduction
- Go to router-fragment-navigation-error on Stackblitz
- Wait for the app to start
- Manually add
.../mockroute to the URL - Refresh the page and observe the navigation working as expected.
- Manually add any fragment (hash) to the working URL (
.../mock#test). - Refresh the page and observe the 404 Not Found react router error.
System Info
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Memory: 8.33 GB / 31.67 GB
Binaries:
Node: 20.18.2 - C:\Program Files\nodejs\node.EXE
npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (129.0.2792.52)
Internet Explorer: 11.0.19041.4355Used Package Manager
npm
Expected Behavior
Navigating to a route containing hash should not throw 'no route matches url' error.
(routes are already defined at this point with .patchRoutes())
Actual Behavior
After the routes are defined with .patchRoutes(), navigating to a route containing hash (#) is throwing us an error:

The same navigation, but to route without hash is working correctly in this scenario.
brophdawg11 and majo44