React JS Quiz
HomeBlogPrivacy PolicyContact UsTutorialsNewBuy me a coffee

useReducer and Complex State

  1. 1.Why a Reducer
  2. 2.Writing a Reducer
  3. 3.A Worked Example
  4. 4.Beyond a Reducer
  5. 🏁 End-of-tutorial quiz
Advertisement
Tutorials/Intermediate/useReducer and Complex State

useReducer and Complex State

Move tangled state transitions into one reducer function, design clear actions, and know when a reducer beats several useState calls or a state library.

Level
Intermediate
Chapters
4
Exercises
1
Reading time
16 min
Start the tutorial →

What you will cover

  1. 1. Why a ReducerThe point at which several useState calls stop being the simplest option.
  2. 2. Writing a ReducerPurity, action design, and the signature in detail.
  3. 3. A Worked ExampleA complete todo reducer, from actions to component.
  4. 4. Beyond a ReducerWhen local state is no longer enough, and what the libraries actually give you.
Already know this? Jump to the 8 question quiz →

Up next after this one: Custom Hooks

Advertisement
Advertisement
Support the developer