#Is .index suffix the only way to make routes "exact"?

4 messages · Page 1 of 1 (latest)

west stump
#

I dont know if im missing something, but the default seems strange to me.

Lets say I have these routes
tvShows.tsx - shows a list of tv shows
tvShows/$slug.tsx - shows details for a show
tvShows/$slug/$seasonNr.tsx - shows details for a season of the show

Currently, if I were to do this route 2/3 will never be hit. It will always default to tvShows.tsx.
The only way I found to fix this was to change the first 2 to
tvShows.index.tsx
tvShows/$slug.index.tsx
(and probably put it on 3 too, just in case I ever add another page for episodes for example)

I understand the first one is using the outlet approach. But it seems strange to me that that is the default. I would expect it to be the inverse.
I now have to add .index to basically every single file.

Actually using outlets is rare for me. I do it pretty much only for the layouts. I would assume its the same for most people. It feels like im missing something...

frigid gazelle
#

$slug folder will again have index.tsx and $seasonNr.tsx

terse lynx