-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hey 👋
Thanks for this library - used it for quite some time now.
I've found an issue which is sort of a "combo effect" of using this library + @react-router/remix-routes-option-adapter
+ react-router v7
. Feel like this is probably the best place to start.
Heres a reproduction:
https://github.com/geemanjs/remix-flat-routes-reproduction
Steps to reproduce:
pnpm install
pnpm typecheck
You can run the app with:
pnpm dev
There are two routes that are different routes - but have the same id in terms of the output of .react-router/types/+register.ts
types.
In the browser we have two routes:
/test-param/cheeses
(Cheese List)/test-param/cheeses/2
(Cheese Item)
The route setup.
/test-param/cheeses
|- $routeParam_/cheeses/index/index.tsx <- note the _ for no layout
/test-param/cheeses/2
|- $routeParam/layout.tsx
|- $routeParam/cheeses/layout.tsx
|- $routeParam/cheeses/$cheeseId/index.tsx
From the react-router
perspective I would assume they would expect you to set a different id property for the route.
Which is why I landed on this repo for raising the issue.
Hope you can help, I've been migrating a pretty large remix app and it all works apart from the type checking 😫 .
James