React Query with Next 13
Hi, is there any guide to implement RQ with Next 13? Thanks
6 Replies
typical-coral•4y ago
I'll just leave this here:
https://twitter.com/TkDodo/status/1585204181651988481
Dominik 🇺🇦 (@TkDodo)
Not gonna lie that (as a maintainer of a library in the data fetching space) I'm feeling mostly afraid of server components and suspense.
"How will this work with react-query" is a good question. It feels like I'm supposed to have an answer but I don't. Huge imposter syndrome rn
Likes
322
Twitter
conscious-sapphire•4y ago
Is there a current discussion on the discord? If not could we use this thread?
typical-coral•4y ago
you didn't look very hard:
#query-next-13
conscious-sapphire•4y ago
pretty easy to miss when the UI looks like below. figured it would be a thread in the react channel. hopefully others are able to find it through this thread as well.

like-goldOP•4y ago
You are doing amazing work mate. I am sure you will figure it out and we as a community can help.
equal-aqua•4y ago
This is how I managed to setup RQ in Next 13:
https://twitter.com/lukemorales/status/1585506850421854210
Luke Morales (@lukemorales)
@TkDodo @diegohaz Example to how setup React Query in the new router:
Separated file to declare client-side providers (not possible to instantiate QueryClient on a file that is not using the 'use client' indicative, since files will run on the server first and createContext is client-side only)

Twitter