Part 04 · State Management
Derived State
Derived valuesuseMemoSingle source of truth
Storing the cart total next to the cart items is a bug waiting to happen. Compute it instead, and when that computation needs caching.
⏱ 6 min · Station 31 of 125
✎
This chapter is being written.
The route is mapped; the full walkthrough arrives here soon.