State Management with React Query: Improve your user and developer experience by mastering server state in React Daniel Afonso Author

State Management with React Query: Improve your user and developer experience by mastering server state in React Daniel Afonso Author
Brand: Packt Publishing
39.99 USD
Buy Now

Solve some of the most common challenges related to data fetching and data mutations while learning one of the most popular libraries for managing server state in ReactLearn how state splits into server and client states and the common challenges associated with themUnderstand how React Query helps with data fetching and mutations to solve server state challengesApply the knowledge gained to improve developer experience and build applications with better UXState management is one of the hottest topics in the React ecosystem. There are many libraries and tools to handle state in React, and with each comes different recipes and opinions. One thing is clear though: state management solutions for handling client state are not so good at dealing with server state. React Query was created as your solution to help manage your server state!State Management with React Query will serve as your guide, taking you from zero to hero with React Query.You’ll begin to understand the historical background of state in the React world and what led to the need to split from a global state to client and server state. With this knowledge, you will understand the need for React Query, and as you advance through the chapters, you’ll understand how React Query helps you deal with common server state challenges like fetching data, caching data, updating, and synchronizing your data with the server. But this is not all, once you’ve mastered React Query, you will be able to apply this knowledge to implement server side rendering.Finally, you will learn some patterns to test your code by leveraging the Testing Library and Mock Service Worker.By the end of this book, you’ll have a new perspective of state and be able to leverage React Query to solve the challenges associated with server state.Learn about state and how it’s often managedDiscover how state splits into server state and Client stateSolve common challenges with server state using React QueryInstall and configure React Query and its DevtoolsManage server state data fetching by using the useQuery hookCreate, update and delete data by using the useMutation hookDiscover the use of React Query with frameworks like Next.js and RemixExplore MSW and the Testing Library to test React Query using hooksJavaScript and React developers who want to improve their state management skills and overcome the challenges brought about by server state while improving their developer and user experience. Basic knowledge of web development and React will help in understanding some of the key concepts covered in this book.What Is State and How Do We Manage It?Server State vs Client StateGetting Started with React QueryFetching Data with React QueryMore Data Fetching ChallengesPerforming Data Mutations with React QueryServer Side Rendering with Next.js or RemixTesting React Query Hooks and Components