JS Guide
HomeQuestionsTopicsCompaniesResources
BookmarksSearch

Built for developers preparing for JavaScript, React & TypeScript interviews.

ResourcesQuestionsSupport
HomeQuestionsSearchProgress
HomeTopicsnextjs

nextjs

Next.js app router, SSR, and full-stack patterns

0 of 12 topics read0%

5 Topics

advanced
Caching & Revalidation
advanced
12 min
Next.js has multiple caching layers — Request Memoization deduplicates identical fetches in a single render, the Data Cache persists fetch results across requests, the Full Route Cache stores rendered HTML/RSC payload at build time, and revalidation (time-based or on-demand) controls when cached data refreshes.
Middleware
advanced
10 min
Next.js middleware runs before every request at the edge — defined in a single middleware.ts file at the project root, it can redirect, rewrite, set headers/cookies, and return responses, using a limited edge runtime without Node.js APIs like fs or native modules.
Performance Optimization
advanced
11 min
Next.js provides automatic code splitting per route, next/dynamic for lazy-loading heavy components, streaming with Suspense for progressive page loading, Server Components for zero-client-JS rendering, and bundle analysis tools — together these techniques minimize JavaScript sent to the browser.
Rendering Strategies
advanced
12 min
Next.js supports four rendering strategies — Static (SSG) generates HTML at build time for fastest delivery, Dynamic (SSR) renders per request for fresh data, ISR revalidates static pages on a timer, and Streaming sends HTML progressively with Suspense — the App Router automatically determines the strategy based on your code.
Server Actions
advanced
11 min
Server Actions are async functions marked with 'use server' that run exclusively on the server — they replace API routes for mutations (form submissions, data updates), support progressive enhancement (forms work without JavaScript), and integrate with React's useActionState and useOptimistic for pending/optimistic UI.