finds.dev← search

// the find

mobxjs/mobx.dart

★ 2,470 · Dart · MIT · updated Jun 2026

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.

MobX.dart is a port of the JavaScript MobX library to Dart and Flutter, giving you transparent reactive state management through observables, actions, and reactions. The Observer widget rebuilds only when the specific observables it reads change, which makes granular UI updates straightforward without manual setState calls. It's for Flutter developers who want the MobX mental model — stores with annotated reactive fields — instead of Bloc, Riverpod, or plain ChangeNotifier.

The codegen story is solid: you annotate fields with @observable and @action, run build_runner, and the mixin with all the tracking boilerplate is generated for you — the output is readable and debuggable, not magic bytecode. Async actions work without any special wrapper; mutations inside an async method are each individually notified, which avoids the common pitfall of forgetting runInAction after an await. ObservableFuture and ObservableStream are first-class — wrapping a Future gives you status, result, and error as observable fields, which eliminates a whole class of loading-state boilerplate. The spy API exposes the reactive graph's internal events, which makes debugging why something did or didn't update actually tractable.

The README itself announces they're looking for maintainers, which is a real concern for a dependency you're building on — the original core contributors have moved on. The codegen adds a build step that trips up new Flutter devs constantly; the part 'counter.g.dart' / class Counter = CounterBase with _$Counter pattern confuses people and the error messages from build_runner when you get it wrong are unhelpful. Testing stores requires either using the real reactive graph (which works but is stateful and order-dependent) or carefully resetting context between tests — there's no clean isolation story for unit tests. DevTools integration is shallow compared to Flutter's own state management solutions; the MobX DevTools for Dart never reached the polish of the JS version's browser extension.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →