#tanstack query v5 with nextjs app dir

10 messages · Page 1 of 1 (latest)

brittle cradle
#

Have you followed the instructions in the docs?

brittle cradle
#

Thanks, we just released this yesterday. Are you using the QueryClientProvider somewhere in a server component? It has to be in a client component.

#

@knotty lily fyi. I think the posted code looks fine 🤔

#

Oh shoot

#

So getQueryClient imports the QueryClient from the index barrel. It looks like that brings in the Provider in a server context as well

#

Have we just poison pilled everything? Man this 💩 is so confusing

#

Yeah your code looks right. Looking at the stack trace, it comes from getQueryClient()

brittle cradle
#

Yeah but it should work from react- query as well

#

You don't install the core separately, so you shouldn't import from it

brittle cradle
#

it should work with:

"@tanstack/react-query": "5.0.0-alpha.68"

sorry for the troubles, I'll try figure it out tomorrow