App Router

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

Client Context

This example uses component composition to show that React context can be used to share state between Client Components that are nested "between" a server boundary.

Demo

  • Shared State: Try incrementing the counter and navigating between categories.

Links