0
0
NextJSframework~5 mins

Intercepting routes (.) in NextJS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of intercepting routes in Next.js?
Intercepting routes lets you show parts of a page or UI without leaving the current page. It helps create smooth transitions and nested layouts by loading content inside existing layouts.
Click to reveal answer
beginner
How do you define an intercepting route in Next.js App Router?
You add parentheses around the folder name in the app directory, like (modal), to mark it as an intercepting route. This folder can then load UI inside the current page without full navigation.
Click to reveal answer
intermediate
What is the difference between a normal route and an intercepting route in Next.js?
A normal route replaces the whole page content. An intercepting route loads content inside the current page layout, letting you keep parts of the UI visible while changing others.
Click to reveal answer
intermediate
Can intercepting routes be used to create modals or sidebars in Next.js?
Yes! Intercepting routes are perfect for modals or sidebars because they let you open these UI parts without leaving the current page or losing state.
Click to reveal answer
beginner
What folder naming pattern signals an intercepting route in Next.js App Router?
Folders with parentheses, like (modal) or (sidebar), are intercepting routes. The parentheses tell Next.js to treat them as UI overlays or nested content inside the current page.
Click to reveal answer
How do you mark a folder as an intercepting route in Next.js App Router?
AWrap the folder name in parentheses, e.g., (modal)
BPrefix the folder name with an underscore, e.g., _modal
CAdd a file named intercept.js inside the folder
DUse a special config file in the folder
What is a common use case for intercepting routes?
ALoading a full new page
BChanging the URL without changing content
CPreloading images
DShowing a modal without leaving the current page
What happens when you navigate to an intercepting route?
AThe browser opens a new tab
BThe whole page reloads
COnly the content inside the intercepting route updates
DThe URL does not change
Which folder name is an example of an intercepting route?
A(modal)
Bmodal_intercept
C_modal
Dmodal
Why use intercepting routes instead of normal routes for UI overlays?
ATo reload the entire page faster
BTo keep the current page visible and only add overlays
CTo disable navigation
DTo hide the URL bar
Explain how intercepting routes work in Next.js and why they are useful.
Think about how you open a popup without leaving a webpage.
You got /4 concepts.
    Describe the difference between a normal route and an intercepting route in Next.js.
    Compare full page reload vs partial UI update.
    You got /4 concepts.