Redux Fundamentals
You can manage some application state without Redux, but everything that Redux manages goes into a single object called the store. Unrestricted access to the same state can reintroduce the errors that React’s prop system was meant to avoid. We need a system to enforce some constraints so that our application doesn’t devolve into a mess.
Redux solves this problem by preventing you from modifying the state directly. Instead, you create actions. Actions are similar to events like click and change, but describe high-level events unique to your application. For example, actions could be “Item added to cart” for an ecommerce application, or “Save requested” for a document editor. We’ll represent actions with JavaScript objects.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access