T
TanStack•2y ago
optimistic-gold

Does react-query conflict with server components in Next.js?

From the Next.js docs:
Next.js has a built-in Data Cache that persists the result of data fetches across incoming server requests and deployments. This is possible because Next.js extends the native fetch API to allow each request on the server to set its own persistent caching semantics.
If I just make the react-query fetcher use native fetch (not axios or something) it shouldn't conflict right? I would love to know more about this whole thing.
2 Replies
unwilling-turquoise
unwilling-turquoise•2y ago
You Might Not Need React Query
React Query is a great library, but like any tool, you should choose it for the right problem
optimistic-gold
optimistic-goldOP•2y ago
haha I suspected there was a blog post somewhere but couldn't find it. Thank you 🙇

Did you find this page helpful?