-
I recently saw that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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