I'm just starting with Remix and struggling to understand the Route system.
Looking at the documentation around Conventional Route Folders it seems to me I should be able to create URL structures like the below to create a page like /test and also have a page like /test/dynamic-route which will provide a param value - but Remix will only ever return the root /test page (try following this links on this test page).
So my questions are:
- Why does it always redirect to the folder root page (
/test) - What's the difference between
/test/route.tsxand/test._index/route.tsx? Do I need them both?
As I'm very new to this metaframework I'm sure I'm missing something simple.
I've created a StackBlitz example of the issue I'm seeing here - feel free to fork / play!

The
test/route.tsxis the parent layout for all thetest/*routes. If you want to render your child routes, you need an<Outlet>(think of it is thechildrenprop).test/_index/route.tsxis the index route, and matches the/test/URL. The contents will be rendered in the<Outlet>fromtest/route.tsx.If you run
npx remix routes, you'll see the route structure.Here's my fork that fixes the layout.
https://stackblitz.com/edit/remix-run-remix-kl2as5?file=app%2Froutes%2Ftest%2Froute.tsx