rq

react-query

⚛️ Hooks for fetching, caching and updating asynchronous data in React

Showing:

Popularity

Downloads/wk

959K

GitHub Stars

24.4K

Maintenance

Last Commit

1mo ago

Contributors

386

Package

Dependencies

3

License

MIT

Type Definitions

Built-In

Tree-Shakeable

Yes?

Reviews

Average Rating

4.8/575
Read All Reviews
yannbf
s-r-aman
rohanSaroha-pharmeasy
codespool
binaryman008
tsdevv
Dhruvkaran

Top Feedback

11Great Documentation
11Easy to Use
8Performant
7Responsive Maintainers
4Highly Customizable
4Bleeding Edge

Readme

React Query Header

Hooks for fetching, caching and updating asynchronous data in React

#TanStack semantic-release Join the discussion on Github Best of JS Gitpod Ready-to-Code

Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts

Visit react-query.tanstack.com for docs, guides, API and more!

Still on React Query v2? No problem! Check out the v2 docs here: https://react-query-v2.tanstack.com/.

Quick Features

  • Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!)
  • Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime)
  • Parallel + Dependent Queries
  • Mutations + Reactive Query Refetching
  • Multi-layer Cache + Automatic Garbage Collection
  • Paginated + Cursor-based Queries
  • Load-More + Infinite Scroll Queries w/ Scroll Recovery
  • Request Cancellation
  • React Suspense + Fetch-As-You-Render Query Prefetching
  • Dedicated Devtools
  • (depending on features imported)

Become a Sponsor!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Tanner Linsley

💻 🤔 💡 🚧 👀

Andrew Cherniavskii

💻 🐛

Thibaut Tiberghien

📖

Rohit Garg

🔧

Avinash

💻 🐛

Jason O'Neill

🚧 ⚠️

Jack Zhao

💻 🐛

dpyzo0o

💻

Jelte Liekens

💻

Jen Gettings

💻

Justin

💻

Marcelo Alves

💻

Zorza

📖

Dominik Dorfmeister

💻 📖 🚧 💬 👀

Alex Johansson

💻

Eddy

💻

Prateek Surana

💻

Rene Dellefont

💻 📖

Janne Vuoti

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Rate & Review

Great Documentation11
Easy to Use11
Performant8
Highly Customizable4
Bleeding Edge4
Responsive Maintainers7
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Yann BragaAmsterdam22 Ratings18 Reviews
Engineer @chromaui at full steam 🚂
1 month ago
Performant
Responsive Maintainers
Great Documentation
Easy to Use
Bleeding Edge

This library provides a super easy experience for data fetching in React. All you do is define the endpoint and optional configuration and it will take care of everything for you, providing the famous “loading”, “success” and “error” states that previously everyone had to build manually with a combination of React hooks, plus it adds a layer of caching and allows for retryability. I’d highly suggest to use this in projects. Even other tools like @reduxjs/toolkit are using similar approach than this.


0
SR AmanNew Delhi, India88 Ratings93 Reviews
Run and Fall, Rise and Run.
5 months ago
Easy to Use
Responsive Maintainers

React query has been my go to library with axios for all of my data fetching needs. It can be hard to understand why we are using react query at all, like why use it. But after using it, in sometime you will understand why we are using it and why it works the way it does. This library is just delightful to use after you understand. React tanner put a lot of effort and thought process in making this. This is made very safely too, so that beginners dont make mistake. This supports typescript really well, so that is a must have. And its docs are good, plus the community is just insanely good. Apis are easy to use.


1
Yogi-Kmr
rohanSaroha-pharmeasy30 Ratings48 Reviews
1 month ago
Great Documentation

I got to know about react-query recently but i am very glad to know because of the performance and features it gives is simply unbelievable. No need to take care of loading state, error state. We can mutate the api cll easily.SUPERB


1
s-r-aman
Saša PulHelsinki, Finland17 Ratings21 Reviews
9 months ago
Great Documentation
Easy to Use
Performant
Highly Customizable

I recently stumbled on the idea of "separating ui and server state" in react apps. This library was suggested as the "server state" handler. The whole concept takes a bit of getting used to, but once you do, it makes perfect sense. React query provides hooks that hold your server state (anything you fetch over the network), handle updating, caching, and pagination (among other features). It is also very configurable, and it works pretty well with typescript. A definite recommendation for mid to large react apps.


0
ankush-singh56 Ratings58 Reviews
1 month ago

Amazing for doing any kind of api calls, it provides a very developer friend UX to do any kind of calls. Have been using this for quite some time, and I have to say they did an awesome job to keep the thing simple. They even cache it and do the local update so that there is no delay in api update.


0

Tutorials

No tutorials found
Add a tutorial