T
TanStack5mo ago
deep-jade

Question on pathless layout vs route groups

I'm trying to understand the differences between these 2 features of Tanstack route and why should I use one over the other? They both seem to achieve the same results. Pathless layout
routes/
├── _authed/ # Pathless layout for auth check
│ ├── route.tsx # Auth check logic
│ ├── dashboard.tsx # /dashboard
│ ├── settings.tsx # /settings
├── index.tsx # Home page
├── login.tsx # Login page
├── register.tsx # Regisration page
routes/
├── _authed/ # Pathless layout for auth check
│ ├── route.tsx # Auth check logic
│ ├── dashboard.tsx # /dashboard
│ ├── settings.tsx # /settings
├── index.tsx # Home page
├── login.tsx # Login page
├── register.tsx # Regisration page
Route group
routes/
├── (authed)/ # Route group for auth check
│ ├── route.tsx # Auth check logic
│ ├── dashboard.tsx # /dashboard
│ ├── settings.tsx # /settings
├── index.tsx # Home page
├── login.tsx # Login page
├── register.tsx # Regisration page
routes/
├── (authed)/ # Route group for auth check
│ ├── route.tsx # Auth check logic
│ ├── dashboard.tsx # /dashboard
│ ├── settings.tsx # /settings
├── index.tsx # Home page
├── login.tsx # Login page
├── register.tsx # Regisration page
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?