index-index and index-layout route. #1490
-
I understand that the title might be a bit convoluted but I have no idea how to title this. I have been trying to migrate from SPA, using react-router v6, to remix but I have come to a problem. I have no idea how to reproduce this route config using remix's route system
routing would resolve to something like this
Altho, I'm not sure if it's even possible. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Remix has got you covered, this is exactly what pathless routes and splat routes are for 😃
|
Beta Was this translation helpful? Give feedback.
-
linked to #1907 with my question:
|
Beta Was this translation helpful? Give feedback.
-
Would love to understand how to do this with v2 |
Beta Was this translation helpful? Give feedback.
Remix has got you covered, this is exactly what pathless routes and splat routes are for 😃
$.tsx
is your*
route, but instead ofNavigate
I recommend usingredirect
instead__app.tsx
is the layout route that will apply only to__app/path1.tsx
and__app/path2.tsx
, notindex.tsx
, and because you're using pathless routes there won't be any effect on the URLindex.tsx
is your landing page