React Query is an asynchronous state management library and data fetching orchestrator designed to fetch, cache, and synchronize server state in web applications. It functions as a server-state cache manager that handles asynchronous data requests to keep local application state in sync with a remote server.
The library implements a stale-while-revalidate cache pattern, which provides immediate access to cached data while triggering background updates to maintain consistency. It further supports optimistic user interface updates, allowing the interface to change immediately during data mutations while syncing with the server in the background.
The utility covers a broad range of capabilities including remote data mutation, web data caching, and the management of pagination and dependent queries. It also provides tools for optimizing data loading and synchronizing server state across various JavaScript and TypeScript UI frameworks.