Next.js · Senior · Question 43 of 75

How does the URL-preserving modal pattern work in the App Router?

Explanation

On client navigation, the interceptor renders content in the modal slot over the current page; the URL reflects the open item, and the link can be shared. On direct access, the full page opens. Closing is router.back(). default.tsx guarantees an empty slot when the modal isn't active.

Further reading

Problem with a question

Next.js · Senior · question 43

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz