TanStack Query

A library that fetches, caches and refreshes server data in frontend apps, and runs changes to it as mutations.

In more detail

Each piece of data is cached under a query key; invalidating a key makes the library refetch it. Mutations have lifecycle callbacks such as onMutate, onError and onSettled, which are the hooks for optimistic updates and rollback.

Related terms

Taught in

References