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

Taught in

References