react query
Unanswered
Chinese Alligator posted this in #help-forum
Chinese AlligatorOP
is using react query with next.js is okay, share any git repo where it is implemented or any resource
5 Replies
Docs mention React Query in [Data Fetching Libraries](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching#data-fetching-libraries)
You can fetch data in Client Components using data fetching libraries such as SWR or React Query. These libraries provide their own APIs for caching, revalidating, and mutating data.Not sure about an example, tho
Southeastern blueberry bee
Following this documentation will helps you understand the pros and cons of using rq with nextjs and how setup it https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr
Southeastern blueberry bee
Example of implementation https://github.com/younes101020/Todo/tree/main/apps/frontend
Chinese AlligatorOP
can you guys explain what are the cases when it can be used in next.js apps
American Fuzzy Lop
I've used tanstack query in all of the web apps which didnt need server side rendering. It is really helpfull for making fetch requests with caching + having loading and error states. Tanstack query can be even more powerfull than that but I havent dived deeper into it