The Philosophy of Next.js
March 22nd, 2024//Ep. 183
Sam and Ryan discuss the core values of the Next.js framework, and how those values motivate several of the framework’s design decisions. They talk about caching, why layouts don’t have access to the URL, and why the router doesn’t expose navigation events, as well as how developers should think about extending Next’s functionality with their own application code.
Timestamps
- Intro
- Why don’t layouts re-render in Next.js?
- Push-based vs. pull-based rendering
- Thinking about re-renders in a pure React app
- Why Server Actions need to call the revalidate* APIs
- Why doesn’t Next.js pass the request to every page and layout?
- Immediate-mode rendering vs. “Do the least amount of work possible”
- Is opting-in to more re-renders framework fighting?
- Helping users by communicating the philosophy
- Why doesn’t Next.js expose global router events?
- Why it’s important to understand Next’s design decisions when choosing it for your next project