Dmytro Morar
State Management

Middleware

Middleware is a hook between dispatch and reducers that can intercept actions.

What it enables

  • Async logic and side effects
  • Logging, analytics, error reporting
  • Filtering, transforming, or canceling actions

Key idea

  • Middleware never updates state directly; reducers do

On this page