claude-start-cf
Back to posts

Layout routes and Outlet

/posts/3 — src/routes/posts/$postId.tsx

A file like posts.tsx defines a layout route. It renders shared UI (nav, sidebar, etc.) and uses <Outlet /> to render its child routes. The children are files inside the posts/ directory.

Dynamic route: The postId param was captured from the URL as "3" via Route.useParams().