TanStack Start Layouts Explained (Pathless Layout Routes + Outlet)
The Coding Armature
0:00 / 0:00
TanStack Start Layouts Explained (Pathless Layout Routes + Outlet)
106 просмотров · 2 недели назад
The Coding Armature
36 подписчиков
106 просмотров · 2 недели назад
Layouts in TanStack Start: stop copy-pasting your header into every route! In this video we build a reusable header, see why pasting it into every page, or even into __root.tsx, falls short, and then use pathless layout routes and the Outlet component to build layouts that are DRY and flexible. We finish by giving the Products page its own header without touching any other page.
📖 Written version
(Dev.to):https://dev.to/wadethomastt/tanstack-...
▶️ TanStack Start Basics: • TanStack Start Layouts Explained (Pathless...
▶️ Directus series: • DIRECTUS COLLECTIONS EXPLAINED — Directus ...
⏱️ Chapters
0:00 Why layouts matter
1:40 Create a simple header
2:45 Pasting the header into every route (and why it's a problem)
4:40 Using a reusable MainHeader component
7:50 Adding the header to __root.tsx
10:02 Layouts and the Outlet component
10:35 Creating the pathless layout route (_appLayout)
13:40 Moving routes under the layout
16:15 A different header for a specific page (ProductsLayout)
20:22 Summary
🧰 What we're using
TanStack Start / TanStack Router
React + TypeScript
Tailwind CSS
shadcn/ui
Directus (from earlier in the series)
💬 Questions or stuck on a step? Leave a comment and I'll help.
🔔 Northern Range Digital: https://northernrangedigital.com
#TanStackStart #TanStackRouter #React