Skip to main content
InterviewHubPRO
Section Overview
Q22

Question 22 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

44%
Next.js & App Router (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

Intercepting Routes (`(.)`, `(..)`, `(...)`) for Shareable Modals.

senior LevelSystem Design

In Simple Words: Allows you to intercept a route from within the current layout while displaying a modal, while direct URL visits or hard refreshes display the full dedicated page:

  • (.) matches segments on the same level.
  • (..) matches segments one level above.
  • (...) matches segments from the root app directory.
  • Example: Clicking a photo in an Instagram-like feed opens a modal (app/feed/(..)photo/[id]), but sharing the link myapp.com/photo/42 directly renders the full standalone photo page!