Skip to content

only supports Suspense but doesn't support server components? #5729

Answered by TkDodo
hyjoong asked this question in General
Discussion options

You must be logged in to vote

If you are using react query, you are likely using it because it's an async state manager that keeps your data up-to-date over time. To do that, it requires a filled cache on the client. And yes, it requires client components to do that, because it runs fetches from the browser to achieve that.

If you want a pure server solution, where your JS only runs on the server, you don't need react-query, because it wouldn't bring anything beneficial to the table.

https://tkdodo.eu/blog/you-might-not-need-react-query

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hyjoong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants