Skip to main content

React Query


What is it

React Query is a data-fetching library for React that handles fetching, updating and caching of data. Can be used to fetch data from a REST API, a GraphQL API, or any other data source. Most comparable with Apollo.

When to use it

As it has very little configuration overhead, it should be used whenever you need to fetch data from an API over HTTP in your React application.

Can be used as an alternative to Apollo for GraphQL. Note that react-query does not support cache normalization on response data. Rather, react-query caches on request parameters.

How to learn it

Installation, setup instructions and documentation can be found here. A simple example of a GET request can be found here.