Next.js › Parallel Routes & Intercepting Routes
What is an intercepting route, and what problem does it solve?
IntermediateAnswer
An intercepting route lets you show a different view when a link is clicked from within your app, such as opening a photo in a modal overlay, while still showing the full dedicated page if that same URL is visited directly, such as through a page refresh or a shared link.
// app/feed/@modal/(.)photo/[id]/page.js
// This intercepts navigation to /photo/[id] from within /feed
// showing it in a modal instead of a full page navigationReal-world example A photo sharing app shows a photo in a modal overlay when a user clicks it from their feed, while directly visiting or sharing that same photo's link still loads the complete standalone photo page.