T
TanStack14mo ago
eastern-cyan

Flat routes don't work in TanStack Start?

In TanStack start, if I use flat routes using the dot operator, it doesn't appear to work as intended? This does however work if I nest it in a folder with an index file like I would in NextJS. Are there any caveats I'm missing here to get this to work correctly in TanStack Start?
No description
No description
5 Replies
wee-brown
wee-brown14mo ago
Matches.tsx needs to render an outlet Show the content of matches.tsx
eastern-cyan
eastern-cyanOP14mo ago
The matches.tsx page is just the default page that gets generated and doesn't have an outlet. So I'm guessing then it means I would have to do something like: - matches.tsx (outlet here) - matches.index.tsx - matches.$slug.tsx Sound about right? (Just tested it, that works.) Thanks, it wasn't so clear from the docs
harsh-harlequin
harsh-harlequin14mo ago
can you help improve the docs? ideally create a PR with changes that you would have needed to directly understand this from the docs
wee-brown
wee-brown14mo ago
No problem
eastern-cyan
eastern-cyanOP14mo ago
I can see if I can find some time to help out with docs

Did you find this page helpful?