T
TanStack2mo ago
conscious-sapphire

The sub-route's context type is inferred as undefined, which contradicts the facts.

As the title suggests, here are the reproduction steps: https://stackblitz.com/edit/github-emnv33sw?file=src%2Froutes%2F_pathless%2Froute.tsx,src%2Froutes%2F_pathless%2Fchild.tsx I'm working on a protected API route using pathless middleware. Any suggestions for a better implementation are welcome!
StackBlitz
Router Start Basic Example - StackBlitz
Run official live example code for Router Start Basic, created by Tan Stack on StackBlitz
4 Replies
conscious-sapphire
conscious-sapphireOP2mo ago
I've written a bit more code, and I'm still struggling to understand the distinction between pathless routes and route groups. Their functionality seems very similar to me. The URLs look the same, and both appear to execute route.tsx. Can someone clarify the key differences? I added a comparison between pathless and group. Their functionality seems to be the same, is the difference only semantic?
unwilling-turquoise
unwilling-turquoise2mo ago
yes it wasnt always like this, but now they are pretty much the same
unwilling-turquoise
unwilling-turquoise2mo ago
GitHub
Release v1.132.54 · TanStack/router
Version 1.132.54 - 10/12/25, 9:36 PM Changes Fix ignore whitespace when detecting handler and createMiddleware calls (#5458) (44bcbd9) by Manuel Schiller server function context types inheritance ...
conscious-sapphire
conscious-sapphireOP2mo ago
Blazing fast! Thanks!

Did you find this page helpful?