Streaming in Next.js: How Progressive Rendering Works
Streaming sends HTML to the browser in chunks as each part of a page becomes ready. Learn how Suspense and loading files make it work.
Full-stack React framework
Streaming sends HTML to the browser in chunks as each part of a page becomes ready. Learn how Suspense and loading files make it work.
loading.js wraps a route in a Suspense boundary to show instant fallback UI. Learn where it goes, what it wraps, and its main caveat.
Skeletons mirror the shape of loading content to prevent layout shift. Learn to build them in Next.js with loading files and Suspense fallbacks.
SWR caches, deduplicates, and revalidates client-side requests. Learn to set up useSWR in a Client Component.
TanStack Query manages server state with a client cache. Learn to set up the provider and use useQuery in a Client Component.
Seed a client data cache with data the server already fetched, so the first render shows content and skips a duplicate request.
Cap slow requests with AbortSignal.timeout and catch failures before they blank the page. Learn the timeout and error handling pattern.
How Next.js 16 caching works with Cache Components, the use cache directive, cacheLife lifetimes, and the static shell that mixes cached and streamed content.
What the cacheComponents flag does in Next.js 16, how it changes rendering defaults, and how to migrate from the old experimental caching flags.
The use cache directive works at file, function, and component scope. Learn what each placement caches, how cache keys are built, and the constraints.
use cache: private caches results per user in the browser only. Learn what it allows, what it never stores on the server, and when to reach for it.
use cache: remote stores cached output in a durable handler shared across server instances. Learn when it pays off and how to keep hit rates high.