Relative Content

Tag Archive for reactjsnext.jsstate

NextJS sharing state between sibling client components that are children of server component

I have a header component that has interactivity so instead of turning the whole component into a client component i take out the interactivity and make small client components and keep the header as server component, the problem is there states that are shares between these small client components but since i can’t keep the state in the header component because its server component, how can i share these states between the children ?

NextJS sharing state between sibling client components that are children of server component

I have a header component that has interactivity so instead of turning the whole component into a client component i take out the interactivity and make small client components and keep the header as server component, the problem is there states that are shares between these small client components but since i can’t keep the state in the header component because its server component, how can i share these states between the children ?