Skip to content

Glossary: Next.js Beyond the Basics

await connection()

Also written: connection()

A function from `next/server` that makes Next.js wait for a real visitor before continuing, so the code after it runs on every request instead of once at build time. It is used before reads of data that must be fresh, such as a database query.

Where the book teaches it

Related terms

"use cache"SuspensePrerender