Home

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

actions
describe
events;
reducers
compute
new
states.
Immutability
is
central:
reducers
should
not
mutate
existing
state
but
return
a
new
object.
redux-thunk
and
redux-saga.
Store
enhancers
add
features
such
as
developer
tools
integration.
offers
a
recommended,
opinionated
approach
that
reduces
boilerplate
and
standardizes
setup,
reducers,
and
store
configuration.
The
ecosystem
also
supports
persistence,
routing,
and
server-side
rendering.
note
boilerplate
in
early
versions,
though
Redux
Toolkit
has
mitigated
this.
Redux
remains
one
of
the
most
commonly
used
state
management
solutions
in
JavaScript,
with
alternatives
available
for
smaller
projects.