Sébastien Rigaux

Tech watch

← All links

State management

Organizing and synchronizing application state across data and components.

Diagram connecting application state values—billing, role, plan, and live logs—to elements in a dashboard.

When an agent changes a UI, checking a single account cannot cover every role, plan, or feature flag. Matt Rothenberg shows how values scattered across hooks, providers, and layouts can hide overlooked states — such as a Delete button shown to a view-only user.

Making display state an explicit component input lets teams render relevant combinations directly, test them, or compare them in a visual grid. Storybook and Playwright complement this approach, but they do not choose which scenarios to cover; that decision still matters.

Matt Rothenberg

Mutative graphic on a dark gray background, with “Better immutability, Faster immutable updates” in orange and white and an orange logo.

Mutative lets developers write mutations against a draft to produce a new immutable state, avoiding manual spread copies at every level. It also supports arrays, Set and Map, along with patches and optional freezing.

Its benchmarks report a geometric mean 3.6 times faster than Immer with matched settings, or 6.6 times with each library’s defaults. Results vary by workload; hand-written reducers remain faster in most of the cases shown.