You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation Getting Started Flow - auto file gen can get users stuck #5351
New user follows the getting started flow "build from scratch" can get stuck with with dynamic paths "not working" because the posts.tsx which is meant to be a layout route in the example is auto filled with a page code.
There is nothing wrong with the code here it can just lead to a poor first experience of the framework.
Check whether the dev server has auto filled the files with RouteComponents
Navigate to localhost:3000/posts/10
Expected behavior
When dev app is running the dynamic url (posts/$postId.tsx) does not appear to be working because the posts.tsx captures all requests rather than being a layout route.
This is not a great experience for someone first exposure to the Tanstack framework.
'd like to work on this issue. I plan to update the React routing documentation to clarify the behavior of generated parent/layout routes and explain when is required for nested and dynamic routes. I'll also add a small example showing the expected posts.tsx, posts/index.tsx, and posts/$postId.tsx structure.
I'd like to work on this issue. I plan to update the React routing documentation to clarify the behavior of generated parent/layout routes and explain when <Outlet /> is required for nested and dynamic routes. I'll also add a small example showing the expected posts.tsx, posts/index.tsx, and posts/$postId.tsx structure.
Activity
docs(start): explain that layout routes must render <Outlet>
fix(router-generator): keep Outlet import with default route body to …
Jyatin commentedon Sep 22, 2026
'd like to work on this issue. I plan to update the React routing documentation to clarify the behavior of generated parent/layout routes and explain when is required for nested and dynamic routes. I'll also add a small example showing the expected posts.tsx, posts/index.tsx, and posts/$postId.tsx structure.
Jyatin commentedon Sep 22, 2026
I'd like to work on this issue. I plan to update the React routing documentation to clarify the behavior of generated parent/layout routes and explain when
<Outlet />is required for nested and dynamic routes. I'll also add a small example showing the expectedposts.tsx,posts/index.tsx, andposts/$postId.tsxstructure.xyonx-bot commentedon Nov 9, 2026
Opened a PR for this: #8910 — #8910