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
The href utility is missing some valid routes. I have 2 fairly large projects with this problem. With version 7.2.0 I added href utility everywhere which has been helpful. Although when I upgraded to 7.3.0 or 7.4.0 some of those routes (which still work perfectly fine), aren't available in the href utility.
I've created this very small reproduction using flatRoutes with 3 route files.
But for whatever reason, the /roles route is not available in the href utility. Now I know I could just rename some of these but I believe this should be valid. My 2 other projects have much more complicated routes with many more nested layouts and url params and such. But this is the bare minimum I can create to repo the issue to help narrow it down.
I'm using React Router as a...
framework
Reproduction
The
href
utility is missing some valid routes. I have 2 fairly large projects with this problem. With version 7.2.0 I addedhref
utility everywhere which has been helpful. Although when I upgraded to 7.3.0 or 7.4.0 some of those routes (which still work perfectly fine), aren't available in thehref
utility.I've created this very small reproduction using
flatRoutes
with 3 route files.routes/roles.tsx
routes/users.roles._index.tsx
routes/users.tsx
I should have these routes available:
/roles
/users/roles
/users
But for whatever reason, the
/roles
route is not available in thehref
utility. Now I know I could just rename some of these but I believe this should be valid. My 2 other projects have much more complicated routes with many more nested layouts and url params and such. But this is the bare minimum I can create to repo the issue to help narrow it down.Here's the repo: https://github.com/kevinbailey25/test-flat-routes
Just run
npm run typecheck
and you'll see the TS errorSystem Info
Used Package Manager
npm
Expected Behavior
There should be no TS errors.
Actual Behavior
TS Error: Argument of type '"/roles"' is not assignable to parameter of type 'keyof Params'.
The text was updated successfully, but these errors were encountered: