Part 2: Managing Server State with React Query
When dealing with server state, many challenges are attached to how we read from it. From caching to pagination, we will understand how the React Query custom hook called useQuery
makes this work while giving an amazing combined developer and user experience.
As well as the challenges of how we read our server state, creating, updating, and deleting it brings about another set of challenges. Luckily, React Query has another custom hook that comes to the rescue called useMutation
.
After understanding the pillars of React Query, you might be wondering whether popular server-side frameworks such as Next.js and Remix allow you to use React Query. Spoiler alert – they do, and you will learn how here.
To wrap up and make sure that you will be able to sleep well at night, you will learn a set of recipes you can use to test your React Query, using components and custom hooks by levering Mock Service Worker and the React Testing...