1
What Is State and How Do We Manage It?
State is a mutable data source that can be used to store data in a React application and can change over time and be used to determine how your component renders.
This chapter will refresh your existing knowledge about state in the React ecosystem. We will review what it is and why it is needed, and understand how it helps you build React applications.
We’ll also review how you can manage state natively in React by using the useState hook, the useReducer hook, and React Context.
Finally, we’ll offer brief descriptions of the common state management solutions such as Redux, Zustand, and MobX and understand why they have been created and the main common concept they all share.
By the end of this chapter, ...
Get State Management with React Query now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.