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.js
acts 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.js
only renders at/team
. - The inner
team/$username.js
renders for/team/adi-1
,/team/adi-2
etc.