@codinginflow route.tsx is the main one here whereas index.tsx is acting kind of a fallback when no other matches exist. I mean it obviously works for you. But it's not "best practise" and should be handled differently.
@codinginflow Yes, I used route.tsx for the layout and index.tsx for the page. I’m not sure if it’s a good idea or not.
@codinginflow I do the same since I use route.tsx for the layout. I have no idea if it’s correct or not.
@codinginflow The index.tsx will render inside the <Outlet /> in route.tsx.
@codinginflow I do this when I have a list of items. /todos - route.tsx <- holds my list of items on the left hand side with the <Outlet /> on the right - index.tsx <- /todos goes here while keeping the list visible - $todoId.tsx <- /todos/$todoId goes here while keeping the list visible
@codinginflow I believe so The route.tsx serves as the layout/entry for the folder route while the index.tsx serves as the default route that is matched when no other route is matched.
@codinginflow Yes. You need to use the outlet inside of route.tsx tho. What’s your use case ?
@codinginflow If I'm not mistaken route can be used as a layout or simply to apply context to all child routes.
Need an easy way to tail a parlay? Tag @Playbook with your book of choice and we’ll build it for you. In your reply, ride it as-is or tweak any legs ✏️ exactly how you want them.