Jotai Example
I used Jotai and Next.js to create this very simple example. It renders two client components from within a server component, and uses Jotai to give both client components access to a shared state, i.e. the background colour.
Client Component
Client Component
Server Component