Dmytro Morar
State Management

Async Thunk Flow

Thunk enables async work by letting dispatch accept functions.

Typical flow

  1. UI dispatches a thunk
  2. Thunk runs async work
  3. Thunk dispatches start/success/error actions
  4. Reducers update state as usual

Why it helps

  • Keeps async logic out of components
  • Maintains pure reducers

On this page