TanStack Query
TanStack Query (formerly known as React Query) is hands down one of the best ways to handle queries and application state in JavaScript and TypeScript applications, and it remains our preferred choice for it.
It takes care of fetching, caching, background revalidation, deduplication of in-flight requests and invalidation. That removes a whole category of hand-rolled code that used to end up in every project, along with the bugs that came with it.
Despite the old name, TanStack Query is no longer React-specific. It is built on a framework-agnostic core with adapters for the other major frontend frameworks, so the same approach and most of the same mental model carry across the frontend stacks we work in.
The rest of the TanStack family is worth knowing too. Libraries such as TanStack Table, Router, Form and Virtual are of the same quality and share the same design philosophy, and we use them where they fit.
TanStack Query (formerly known as React Query) is our preferred React framework for managing state in the frontends of our web applications.