Skip to content
Discussion options

You must be logged in to vote

Remix has got you covered, this is exactly what pathless routes and splat routes are for 😃

app/
├── routes/
│   ├── $.tsx
│   ├── __app/
│   │   ├── path1.tsx
│   │   └── path2.tsx
│   ├── __app.tsx
│   └── index.tsx
└── root.tsx
  • $.tsx is your * route, but instead of Navigate I recommend using redirect instead
  • __app.tsx is the layout route that will apply only to __app/path1.tsx and __app/path2.tsx, not index.tsx, and because you're using pathless routes there won't be any effect on the URL
  • index.tsx is your landing page

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@andrei9669
Comment options

Answer selected by andrei9669
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@silvenon
Comment options

@eladchen
Comment options

@silvenon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants