docs(start): explain parent route outlets #7831
OpencoyaSONG(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/7831/headopened - docs/start/framework/react/guide/routing.md lines 223 to 225OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -204,0 +205,21 @@205+When the route generator creates a file such as `posts.tsx`, it adds a starter206+component. Because `posts.tsx` is the parent of `posts/index.tsx` and207+`posts/$postId.tsx`, its component must render an `<Outlet />` for those child208+routes to appear:209+210+```tsx title="src/routes/posts.tsx"211+import { Outlet, createFileRoute } from '@tanstack/react-router'212+213+export const Route = createFileRoute('/posts')({214+ component: PostsLayout,215+})216+217+function PostsLayout() {218+ return <Outlet />219+}220+```221+222+Place `<Outlet />` wherever the child route should render within any shared223+layout UI. If the parent route does not need a component, remove the generated224+`component` option instead; a route without a component renders an outlet225+automatically.
coyaSONG(GitHub profile, opens in a new tab) linked this to fix #5351
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID:
d56e543a-db6f-4745-80c7-466558e1ab05📥 Commits
Reviewing files that changed from the base of the PR and between 40be0ec78c1c60fe0f8efa32967747966c78ff32 and b89e41f0a22b24b329e9d63cd0c391f505a0a9b1.
📒 Files selected for processing (2)
docs/start/framework/react/guide/routing.mddocs/start/framework/solid/guide/routing.md🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The React and Solid routing guides now explain how generated parent route components render child routes with
<Outlet />. They also document component-less routes and router-leveldefaultComponentbehavior.Changes#
Routing documentation
docs/start/framework/react/guide/routing.md,docs/start/framework/solid/guide/routing.mdPostsLayoutexample with<Outlet />, describe outlet placement in shared layouts, and document component-less routes anddefaultComponentbehavior.Estimated code review effort: 1 (Trivial) | ~4 minutes
Merge Risk: ⚪ Minimal · up to
b89e4This documentation-only change clarifies parent-route outlet behavior without affecting published code or runtime behavior; no actionable merge-blocking risk remains.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
#5351by explaining that generated parent routes must render or remove the generated component so child routes appear. The React and Solid example…Full details: Linked Issues check
Explanation
The documentation directly addresses issue
#5351by explaining that generated parent routes must render <Outlet /> or remove the generated component so child routes appear. The React and Solid examples support the stated objective.Full details: Docstring Coverage
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share