Next.js · Middle · Question 19 of 75
What are intercepting routes (.)photo/[id] for?
- ✓Correct answer: Showing a route on top of the current page, e.g. in a modal
- 2Intercepting all API requests and logging them on the server
- 3Redirecting an unauthenticated user to the login page
Explanation
On client navigation from a feed to /photo/1, the interceptor renders the photo in a modal over the feed, and the URL changes. On direct access or page reload, the full /photo/1 page opens. It's usually combined with a parallel @modal slot.