Redux

What problem does Redux solve?

State Management

Reducers

Redux reducers are without doubt the most important concept in Redux. Reducers produce the state of an application. The second principle of Redux says the only way to change the state is by sending a signal to the store. Reducers are Pure Function, which is a function (a block of code ) that always returns the same result if the same arguments are passed.

Actions

Actions are plain JavaScript objects that have a type field. Think of an action as an event that describes something that happened in the application.

Store

Redux has one or more immutable stores.

Redux Thunk

With a plain basic Redux store, you can only do simple synchronous updates by dispatching an action. Middleware extends the store's abilities, and lets you write async logic that interacts with the store.

connected-react-router

Synchronize router state with redux store through uni-directional flow (i.e. history -> store -> router -> components).

Codesandbox

Plain Redux

Redux Toolkit