sajad torkamani

You can use pathless route group directories to organise your route files together without affecting their path.

For example, you might do something like this:

routes/
├── index.tsx
├── (app)/
│   ├── dashboard.tsx
│   ├── settings.tsx
│   ├── users.tsx
├── (auth)/
│   ├── login.tsx
│   ├── register.tsx

The following table shows which components will be rendered based on the URL:

URL PathComponent
/<Index>
/dashboard<Dashboard>
/settings<Settings>
/users<Users>
/login<Login>
/register<Register>

As you can see, the (app) and (auth)directories are purely organisationl and don’t affect the route tree.