Next.js 16.4 introduces Cache Components as the recommended development model for all applications. This model, which will be the default in Next.js 17, allows developers to explicitly define which parts of a component tree should be cached using the 'use cache' directive, functioning similarly to HTTP Cache-Control headers.
The release includes the new ensureStatic configuration, which prevents dynamic components from being added to routes. Developers can set this to 'navigation', 'prefetch', or 'shell' modes to guarantee static rendering for specific pages or layouts, helping to control server costs and optimize performance for static-heavy sites.
New navigation and prefetch APIs provide granular control over data loading. By using these APIs, developers can defer the rendering of specific cached content until a user interaction occurs, preventing unnecessary server load during prefetching while maintaining a fast user experience.
The update includes performance improvements such as reduced memory usage, smaller disk footprint in development, faster compilation times, and smaller production bundles. The framework has also been updated to React 19.3.
For existing projects, Next.js 16.4 introduces the 'next upgrade --agent' command. This tool provides AI agents with migration instructions, codemod scripts, and validation steps to assist in transitioning codebases to the new Cache Components model.






