MobX
Discouraged
Not our default choice. We recommend Zustand for most projects.
What is itโ
MobX is a reactive state management library using observable/signal-based patterns. It automatically tracks state dependencies and re-renders only affected components.
Why it's not our defaultโ
- Implicit reactivity can be confusing โ MobX's automatic tracking makes data flow harder to trace and debug vs Zustand's explicit subscriptions.
- Requires decorators or
makeAutoObservableโ class-based patterns or special wrappers feel foreign in a hooks-first React ecosystem. - Smaller community than Redux or Zustand โ fewer tutorials, Stack Overflow answers, and third-party integrations.
- Zustand is simpler for React โ hook-based API is more idiomatic for modern React, no wrapping components in
observer().
When it makes senseโ
- Complex domain models with deep object graphs โ MobX excels at tracking changes in deeply nested, interconnected structures (e.g., form builders, spreadsheet-like UIs).
- Teams migrating from desktop/MVVM backgrounds โ MobX's observable pattern is familiar to developers from C#/WPF or Knockout.
- Existing MobX projects โ maintain consistency rather than rewriting.