Layouts
Nested Layouts
Grouped Layouts
Streaming with Suspense
Root Layouts
File Conventions
Loading
Error
Components
Hooks
Client Context
Styling
CSS and CSS-in-JS
acme.com
/
Server Component Boundary
Counter Context Provider [Client Component]
Server Component Boundary
Home
Electronics
Clothing
Books
Counter Context [Client Component]
0 Clicks
Client Context
Pass context
between Client Components
that cross the Server/Client Component boundary.
Click the counter and navigate between pages.
Because the context provider is above the nested layouts and pages the number of clicks remains constant even between navigations.
Learn more
Created by the
Next.js
team at
Vercel
.
View the code
or
deploy your own
.