Two‑Way Derived State in MobX 6 with Computed Setters
Learn how to give a MobX computed property a setter for true two‑way binding, with a form‑store example, limits on async setters, and common pitfalls to avoid.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to give a MobX computed property a setter for true two‑way binding, with a form‑store example, limits on async setters, and common pitfalls to avoid.
makeAutoObservable infers observable state, computed getters and auto-bound actions from a class shape. The annotations object is where the real engineering decisions live.
Learn how MobX computed values cache derived state, evaluate lazily, and prevent unnecessary React re-renders through structural equality checks.
Stop manually managing useMemo dependencies. Learn how MobX computed values provide automatic caching and lazy evaluation to keep your React UI performant and your state logic declarative.
A diagnostic guide to help you decide between MobX reaction and autorun for React side‑effects, with checks, fixes, and escalation steps.
A decision guide for picking MobX side‑effect primitives (autorun, reaction, when) and batching mutations with runInAction in React, including a comparison table, trade‑offs, and a concrete component example.
Learn how MobX reactions (autorun, when, reaction) can synchronize side‑effects only when observed observables change, reducing renders in a todo list example.
MobX computed values replace manual state synchronization with cached, dependency-tracked derivations. Here's how they work, a concrete cart example, and where they go wrong.
MobX computed values are memoized and lazy, so derived state can live in the reactive graph instead of being manually synced. A cart store example shows the pattern, plus the debugging and deep-observability trade-offs.