data fetching
Loading the data a page needs, such as products or user details, from a database or API.
In more detail
Data can be fetched on the server before the page is sent, or in the browser after it loads. Fetching on the server keeps credentials and heavy libraries off the device; browser fetching suits data that changes while the page is open.
Example
Next.js Server Components fetch with a plain await; libraries such as SWR remain useful for live client-side data.Related terms
- Fetch API — The standard JavaScript function fetch() for making HTTP requests, built into browsers and current server runtimes, which returns a promise for the response.
- React Server Components — React components that run only on the server, sending their rendered result to the browser without shipping their code.
- request waterfall — A chain of requests where each one only starts after the previous one finished, so their waiting times add up.
Taught in
- App Router Architecture: Server-First Paradigms — Next.js 15 & Modern App Router Architecture
- Server Components: Async Execution & Constraints — Next.js 15 & Modern App Router Architecture
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture
- Granular Suspense: Resolving Waterfall Bottlenecks — Next.js 15 & Modern App Router Architecture
- Not Found Handling: not-found.tsx & Programmatic Exits — Next.js 15 & Modern App Router Architecture
- Async Data Fetching: Parallel Requests & Preloading — Next.js 15 & Modern App Router Architecture