docs: warn about <Outlet /> requirement in layout route files - #8232
docs: warn about <Outlet /> requirement in layout route files#8232dikshit-n wants to merge 2 commits into
Conversation
Fixes TanStack#5351 Add a [!WARNING] callout to the 'Creating File Routes' section in docs/start/framework/react/guide/routing.md explaining that layout route files (e.g. posts.tsx) need an <Outlet /> to render child routes. Without it, child routes like /posts/123 silently fail to render, which is a common first-time-user gotcha when following the getting started guide.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe routing guide now explains that layout routes must render ChangesRouting documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The routing guide now documents the required Outlet usage for layout routes without introducing an outstanding merge risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description explains the problem, solution, affected file, testing, and documentation-only scope. It does not reproduce the repository template headings or release-impact checklist, but the required context is mostly complete. Full details: Docstring CoverageExplanation 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. (1 skipped: 1 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. Comment |
Summary
Add a documentation warning to the TanStack Start routing guide explaining that layout route files (e.g.
posts.tsx) need an<Outlet />to render child routes.Problem
Closes #5351
New users following the getting started guide can get stuck when creating nested routes. The development server auto-fills layout route files with a basic component, but without an
<Outlet />, child routes silently fail to render. The user sees no error — the dynamic URL just appears to do nothing. This creates a poor first experience.Solution
Added a
[!WARNING]callout directly in the "Creating File Routes" section ofdocs/start/framework/react/guide/routing.md. The callout:<Outlet />to render children/posts/123appears to do nothing)Changes Made
docs/start/framework/react/guide/routing.md: Added[!WARNING]callout after the file-routes table, before the "Defining Routes" sectionTesting
prettier --checkon the modified file (documentation format is consistent)Checklist
Summary by CodeRabbit
<Outlet />to render child routes.<Outlet />is omitted.