App Router (Beta)

acme.com
/
Server Component Boundary
Counter Context Provider [Client Component]
Server Component Boundary
Counter Context [Client Component]

Client Context

  • This example uses context to share state between Client Components that cross the Server/Client Component boundary.
  • Try incrementing the counter and navigating between pages. Note how the counter state is shared across the app even though they are inside different layouts and pages that are Server Components.