Remix treats nested routes files differently. Its not simply a flat list of routes. Take this example-
routes
team
index.js
$username.js
team.js
- The outer
team.jsacts as a layout component and it will render for any/team/*routes. It has the option to render an Outlet component to decide where to render child route content. - The inner
team/index.jsonly renders at/team. - The inner
team/$username.jsrenders for/team/adi-1,/team/adi-2etc.