Skip to content
Source
Sign inSign up
TanStack/query

Add 'use client' in the correct places #4689

Send to my agent
ClosedTkDodo opened this issue 4 comments
TkDodocommented

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

  1. TkDodo added labelspackage: react-query

  2. 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.

  3. TkDodo added labelsenhancement

  4. TkDodo added labelsgood first issue

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

  6. @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".

  7. TkDodo closed this

Sign in to join this conversation.