React Query is a server-state** library, responsible for managing asynchronous operations between your server and client
Redux, MobX are client-state libraries that can be used to store asynchronous data, albeit inefficiently when compared to a tool like React Query
With those points in mind, the short answer is that React Query replaces the boilerplate code and related wiring used to manage cache data in your client-state and replaces it with just a few lines of code.
With a few hook calls to useQuery and useMutation, we also get to remove any boilerplate code that use to manage our server state eg.
- Action Creators
- Middlewares
- Reducers
- Loading/Error/Result states
- Contexts