Using React Query for Server-Side-Driven State Management
Welcome, my dear reader, to the last chapter describing state management solutions for our Funbook app. In the previous chapter, we looked at the youngest state management library (as of the writing of this book) – Jotai. Jotai is a minimal solution, based on ideas proposed by the Facebook team in their open source library – Recoil. React Query is minimal as well but in a very different sense. React Query is created for managing fetching and mutating data on the server. In this chapter, we will look at what React Query has to offer. We will start by taking a broad look at this library; we will then implement it for data fetching. With our current app setup, we don’t have a real backend server to communicate with, so we can only look at mutating data in theory. We will also look at a few specialized utilities created for React Native by the React Query team.
Here’s a list of topics we will cover...