The Redux core consists of the Store, Actions, and Reducers—the trinity of global state management.
1The Pure Reducer
Reducers are the brains of Redux. They are 'Pure Functions', meaning they don't produce side effects and don't change their inputs. When a reducer receives an action, it doesn't 'change' the state. It looks at the current state, applies the logic, and returns a completely new version. This allows Redux to track changes efficiently and enables features like time-travel debugging.
2Action Design
Actions are the 'Events' of your application. While only a type is required, a good action design includes a payload for the data. By using 'Action Creators', you create a clean API for your components to interact with the store. Instead of components knowing about string types, they just call a function like addTodo('Buy milk') and Redux handles the rest.
