Redux
Redux is a predictable state container for JavaScript applications. It was created by Dan Abramov and Andrew Clark and released in 2015. While commonly used with React, Redux is library-agnostic and can be integrated with any UI framework or vanilla JS. It centers on a single store that holds the entire state of the app. The state is read-only and can only be updated by dispatching actions—plain objects that describe what happened. These actions are processed by reducers, pure functions that compute and return a new state given the previous state and the action. The data flow is unidirectional: action is dispatched, the store forwards it to reducers, a new state is produced, and the UI re-renders accordingly.
Core concepts include the store, actions, reducers, and unidirectional data flow. The store preserves the state;
Middleware extends Redux to handle side effects and asynchronous logic between dispatch and reducers. Examples are
In React apps, React-Redux provides bindings to read state and dispatch actions from components. Redux Toolkit
Redux emerged as a simplification of Flux’s concepts and gained widespread adoption in large-scale applications. Critics