What is React Query?
React Query is a protocol-agnostic collection of hooks for fetching, caching, and updating server state in React.
It was created by Tanner Linsley and is part of a collection of open source libraries called TanStack.
By default, React Query can also work with React Native out of the box, and it is written in TypeScript so that you can benefit from all its advantages, such as type narrowing and type inference.
Since version 4, React Query has been embedded in a collection of libraries called TanStack Query. TanStack Query made it possible to propagate all the amazing features of React Query to other frameworks and libraries, such as Vue, Solid, and Svelte.
React Query leverages queries and mutations to handle your server state. Upon reading this last sentence, you might wonder what queries and mutations are. I’ll show you some code in subsequent chapters so that you can see how React Query handles them, but first, let us learn about queries and...