Fetch, cache and update data in your React and React Native applications all without touching any "global state".
Writing your data fetching logic by hand is on its way out. Just tell React Query where to get your data and how fresh you want to keep it and the rest is automatic. React Query handles caching, background updates and stale data out of the box with zero-configuration.
If you know how to work with promises or async/await, then you already know how to use React Query. There's no global state to manage, reducers to write, or fancy state machines to understand. Just define your function that resolves your data (or throws an error) and the rest is history.
React Query is configurable down to the query with knobs and options to fit every use-case. It even has dedicated hooks for pagination, infinite-loading, and even mutations that make updating your data a breeze. Don't worry though, everything is pre-configured for success!
Instead of writing reducers, caching logic, timers, retry logic, complex async/await scripting (I could keep going...), you literally write a fraction of the code you normally would. You will be surprised at how little code you're writing or how much code you're deleting when you use React Query
Sure, React is the only dependency, but React Query comes fully featured with all the gizmos and gadgets you want or need. From weekend hobby projects all the way up to enterprise e-commerce systems (lookin' at you Walmart!), React Query is jam packed with features.
The latest TanStack news, articles, and resources, sent to your inbox.