Skip to main content

Data for Next.jss

Data in Next.js covers how a page reads and changes information. Server Components can await fetch or a database call directly, and Server Actions let a form or button run a function on the server to write data. Route Handlers expose HTTP endpoints when other clients need an API.

Stage: Data and Caching · Part of the Next.js roadmap · Last reviewed 19 November 2026

What to learn in Data

Data interview questions

What is a Server Action in Next.js?

A Server Action is an async function marked with use server that runs on the server but can be called from a form or a client event. It is used for mutations such as saving a record, and it should validate input and check permissions like any endpoint.

How do you avoid a request waterfall when fetching data in Next.js?

Start independent requests together instead of awaiting them one after another, usually with Promise.all. You can also split the page into components that fetch their own data inside Suspense boundaries so slow queries do not block faster parts of the page.

Where Data fits in the Next.js roadmap

Data belongs to the Data and Caching stage (intermediate level), which takes about 16 hours. Fetch what you need.

Back to the full Next.js roadmap