Next.js Discord

Discord Forum

parallel routes [...allCatch]

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#modals
If you want to navigate elsewhere and dismiss a modal, you can also use a catch-all route.
//app/@auth/[...catchAll]/page.tsx
export default function CatchAll() {
  return null
}

Catch-all routes take precedence over default.js.

my question:
what's the point of this?
if I go to /signup while /login "modal" is open, catchAll isn't needed
if I go to /products, catchAll doesn't do anything
what am I not realizing?

basically documentation code:
https://codesandbox.io/p/sandbox/condescending-curie-4hskwt?file=%2Fapp%2Fpage.tsx%3A4%2C18

2 Replies

Barbary LionOP
bump
Barbary LionOP
bump