The Instagram pattern
Click a photo in a feed: a modal opens with the photo. Refresh the page on that URL: you get a full page view of the photo. Same URL, two presentations. Intercepting routes makes this declarative.
The conventions
| Prefix | Means "intercept from" |
|---|---|
(.) | same level segment |
(..) | one level up |
(..)(..) | two levels up |
(...) | app root |
The pattern in code
Use intercepting routes together with parallel routes (@modal) to render the modal version inside the current layout while preserving the deep-link page for refresh/share.