query icon indicating copy to clipboard operation
query copied to clipboard

Add 'use client' in the correct places

Open TkDodo opened this issue 2 years ago • 1 comments

To be compatible with React Server Components

@Ephem we'd need to decide if this can go into v4 or if we also do this for v5

TkDodo avatar Dec 23 '22 07:12 TkDodo

At least on the surface this is an easy fix with no downsides I can see that helps early adopters play with the new APIs without a bunch of wrapping, so I think we should add it in a v4 minor. I haven't investigated the exact places to add it yet though, but that shouldn't be that tricky.

Ephem avatar Dec 25 '22 10:12 Ephem

I would be happy to contribute here if I get more clarity on the work that needs to be done here :)

Suman085 avatar Jan 01 '23 14:01 Suman085

@Suman085 we'd need to add "use client" at the top of all files that use either state, context or effects in order to have them opt out of being server components in next13.

the devtools would also naturally need "use client".

TkDodo avatar Jan 01 '23 15:01 TkDodo

Please close this issue

abhijithp05 avatar Jan 25 '23 04:01 abhijithp05