mobx.space

When a reaction is the wrong tool

18 September 2026

Reactions are for talking to the outside world: the network, storage, the document title. They are not for keeping two pieces of state in sync.

If a reaction writes to observable state, there is almost always a computed value hiding in it. Find it, and the reaction disappears along with its ordering problems.

A quick test

Ask what happens if the reaction runs twice. If the answer is anything other than nothing, it is doing too much.