Parallel and intercepting routes: render any route within a modal? #60354
Replies: 4 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
For anyone interested, I have a solution for my use case. It is somewhat involved and requires (minor) patching of Nextjs. The basic idea:
This seems to work well but of course I'm not happy having to patch Nextjs. Another downside is also codegenerating these mirrored interception routes as it leads to duplicated js bundles getting served. I'd appreciate if anyone from the Next team would like to give their thoughts! @timneutkens or maybe @ztanner seems to be quite involved in these routing concepts. |
Beta Was this translation helpful? Give feedback.
-
I'm having trouble understanding the parallel and intercepting routes. How do I not show the modal? |
Beta Was this translation helpful? Give feedback.
-
feature needed |
Beta Was this translation helpful? Give feedback.
-
Seems like parallel + intercepting routes is not designed for this, but I wonder if it's possible to use these concepts to render any given route in a modal on top of the current route?
What I have in mind:
<Link>
)<Link>
should be context-aware and probably default to opening routes within the same context (modal), allowing e.g. a layout with a navbar to work automatically in a modalBeta Was this translation helpful? Give feedback.
All reactions