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


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
Was this page helpful?