tezvyn:

Explain Shallow Routing in Next.js Pages Router

Source: nextjs.orgadvanced

This tests URL updates without re-running getServerSideProps or getStaticProps in the Pages Router. A strong answer defines shallow: true, cites query-state UI like filters or modals, and notes same-page and App Router limits.

This tests Pages Router internals: updating the URL via router.push or router.replace without re-executing getServerSideProps, getStaticProps, or getInitialProps. A strong answer defines the shallow: true option, explains it avoids redundant server hits for client-side UI state like filters, tabs, or modals, and notes hard limits including same-page-only transitions, zero App Router support, and that standard React re-renders still fire. Red flag: confusing it with shallow rendering or claiming it skips all component re-renders.

Read the original → nextjs.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Explain Shallow Routing in Next.js Pages Router · Tezvyn