Quick answer
TL;DR
| The problem | A placement needed several independent recommendation lists, not one - the state gained a layer of nesting the update code wasn't built for |
| What I did | Kept the nested shape (it matched the product) and adopted Immer so updates could be written as direct edits |
| Outcome | Unblocked the "add another list" feature, which had existed as non-functional placeholder UI until the state layer caught up |
| Trade-off | A new dependency, and a mutation-looking convention that only works if every update goes through the functions Immer wraps |
The situation
Why the existing update code didn't scale
What I considered
The trade-off
The result
What replaced it
FAQ
Part of the Product Recommendations admin builder case study series →