Changelog
Version history for all Reacton packages. All packages in the monorepo share the same version number.
Packages: reacton, flutter_reacton, reacton_test, reacton_cli, reacton_devtools, reacton_generator, reacton_lint
0.2.0
Unreleased as of this writing — all code, tests, and docs are ready; run dart pub publish per package to release.
Two additive features. No breaking changes from 0.1.2.
flutter_reacton
- New:
ReactonSuspense<T>— unwraps a singleAsyncValue<T>reacton so builders receiveTdirectly. Handles loading, error, and data states with a clean three-callback API. Defaults to stale-while-revalidate; opt out withkeepPreviousData: false. - New:
ReactonErrorBoundary— groups multiple async reactons under one loading/error surface with aresetcallback for retry. Thechildonly renders once every reacton hasAsyncData.
reacton
- New:
VersionedJsonSerializer<T>— first-class persistence migrations. Embeds a schema version (_v) in the stored payload, runs orderedJsonMigrationsteps on load, and refuses to downgrade if a user flashes an older build. Legacy pre-versioned data is treated as version0.
Tests
- 14 new tests for
VersionedJsonSerializer(migrations, error paths, integration withPersistenceMiddleware). - 13 new widget tests for
ReactonSuspenseandReactonErrorBoundary.
How to Adopt
dependencies:
flutter_reacton: ^0.2.0Suspense:
ReactonSuspense<User>(
reacton: userReacton,
loading: (_) => const CircularProgressIndicator(),
data: (_, user) => UserView(user),
);Migrations:
final serializer = VersionedJsonSerializer<Settings>(
version: 2,
fromJson: Settings.fromJson,
toJson: (s) => s.toJson(),
migrations: {
1: (old) => {...old, 'themeMode': old.remove('dark') == true ? 'dark' : 'light'},
2: (old) => {...old, 'analytics': old['analytics'] ?? true},
},
);0.1.2
February 26, 2026
Maintenance release focused on pub.dev compatibility and dependency hygiene.
All Packages
- Bumped version to 0.1.2 across all packages
- Updated
reacton_devtoolsdependency constraints for compatibility with latest DevTools SDK
reacton_devtools
- Updated DevTools extension dependency constraints
- Fixed compatibility with latest
devtools_extensionspackage
How to Upgrade
# pubspec.yaml
dependencies:
flutter_reacton: ^0.1.2
dev_dependencies:
reacton_test: ^0.1.2
reacton_lint: ^0.1.2Then run:
flutter pub upgrade0.1.1
February 26, 2026
Quality improvements targeting pub.dev static analysis scores and documentation.
All Packages
- Added
example/files to all packages for pub.dev example tab - Updated dependency constraints for tighter version pinning
- Fixed static analysis warnings reported by
dart analyze - Improved package descriptions in
pubspec.yaml
reacton_generator
- Bug fix: Added missing
globdependency that causedbuild_runnerfailures- Previously, running
dart run build_runner buildwould fail withCould not find package "glob"if the host project did not depend onglobdirectly - The
globpackage is now listed as a direct dependency ofreacton_generator
- Previously, running
reacton_lint
- Fixed lint rule registration for compatibility with
custom_lintrunner - Ensured all three lint rules (
avoid_reacton_in_build,prefer_named_reacton,unnecessary_reacton_rebuild) are properly discovered by the analysis server
0.1.0
February 26, 2026
Initial public release of the Reacton state management library for Flutter and Dart. This release includes the full feature set across seven packages.
reacton (Core Library)
The foundational reactive primitives, usable in any Dart project (no Flutter dependency).
Reactive Primitives:
reacton<T>(initial, {name, options})-- writable reactive state atomscomputed<T>((read) => ...)-- automatically-tracked derived state that recomputes only when dependencies changeselector<T, S>(source, (value) => ...)-- sub-state selection with customizable equality checks to prevent unnecessary downstream propagationfamily<T, Arg>((arg) => ...)-- parameterized reacton factories that create or retrieve cached instances based on an argumentcreateEffect((read) => ..., effect: ...)-- reactive side effects that re-run when tracked dependencies change
Store and Graph:
ReactonStore-- centralized store that manages the reactive dependency graph, value storage, subscriptions, and batch processingstore.batch(() { ... })-- coalesce multiple writes into a single propagation pass for efficiencystore.snapshot()/store.restore(snapshot)-- capture and restore the entire store state
Async:
AsyncValue<T>-- algebraic data type representing loading, data, or error states withwhen()pattern matchingasyncReacton<T>((read) async => ...)-- declarative async data fetching that automatically tracks dependencies and manages loading/error statesQueryReacton-- query-style async reactons with built-in caching, stale-while-revalidate, and manual refetchRetryPolicy-- configurable retry logic with exponential backoff, max attempts, and retry-on predicatesOptimisticUpdate-- apply changes optimistically with automatic rollback on failureDebouncer-- delay execution until a quiet period elapses (useful for search-as-you-type)Throttler-- limit execution frequency to at most once per interval
Middleware:
ReactonMiddlewareinterface for intercepting all state reads and writes- Built-in
LoggingMiddlewarefor development debugging - Middleware chain is composable: multiple middleware run in order
Persistence:
StorageAdapterinterface withread,write,delete,clear,containsKeyReactonOptions.persistKey-- opt-in persistence per reactonPrimitiveSerializer<T>for simple types (int, double, bool, String)- Pluggable serializers for complex types via
ReactonSerializer<T>
Time and Space:
HistoryReacton-- undo/redo with configurable maximum history depthStateBranch-- create branches of state for speculative edits, then merge or discard- Snapshot diffs for efficient state comparison
State Patterns:
StateMachine<State, Event>-- declarative state machines with typed events, a transition table, and guard functionsObservableList<T>,ObservableMap<K, V>,ObservableSet<T>-- reactive collections that notify on add, remove, and updateLens<S, A>-- composable optics for reading and updating deeply nested immutable state without boilerplate
Architecture:
ReactonModule-- module system for grouping related reactons withonInitandonDisposelifecycle hooks- Saga system for orchestrating multi-step async workflows with cancellation, retry, and compensation
- CRDT (Conflict-free Replicated Data Type) support for collaborative, distributed state synchronization
flutter_reacton (Flutter Integration)
Flutter-specific bindings built on the core reacton package.
Scope:
ReactonScope-- widget that provides aReactonStoreto the widget tree; every Reacton app needs one at the rootReactonOverride-- override reacton values in nested scopes for dependency injection or testing
Widget Builders:
ReactonBuilder<T>-- single-reacton builder that rebuilds when the watched reacton changesReactonConsumer-- multi-reacton consumer widget with a builder callbackReactonListener<T>-- side-effect listener that does not rebuild the child; useful for navigation, snackbars, and analyticsReactonSelector<T, S>-- widget that extracts a slice of a reacton value and only rebuilds when the slice changes
Context Extensions:
context.watch(reacton)-- subscribe to a reacton and rebuild on every changecontext.read(reacton)-- one-time read without subscribing (for callbacks and event handlers)context.set(reacton, value)-- write a new value to a writable reactoncontext.update(reacton, (old) => newValue)-- functional update that receives the current value
Lifecycle:
- Auto-dispose support for reactons scoped to a widget subtree
- Proper cleanup of subscriptions when widgets unmount
reacton_test (Testing Utilities)
A dedicated testing package for writing fast, deterministic tests.
Test Store:
TestReactonStore-- isolated store with in-memory storage that resets between testsReactonTestOverride<T>-- override a writable reacton's initial valueAsyncReactonTestOverride<T>-- override async reactons with.data(value),.loading(), or.error(exception)
Storage:
MemoryStorage-- in-memory implementation ofStorageAdapterfor testing persistence without the filesystem
Mocking and Tracking:
MockReacton<T>-- mock reacton for verifying read/write interactionsEffectTracker-- capture side effects fired bycreateEffectand assert on themGraphAssertion-- assert the structure of the reactive dependency graph (node existence, edge connections)
Widget Test Helpers:
pumpReactonWidget(tester, widget, {overrides})-- convenience helper that wraps a widget inReactonScopeand pumps itstore.expectReacton(reacton, matcher)-- fluent assertion shorthandstore.waitFor(asyncReacton)-- await an async reacton until it resolves or errors
reacton_cli (Command-Line Interface)
Project scaffolding, analysis, and diagnostics from the terminal.
Commands:
reacton init-- add Reacton dependencies topubspec.yaml, createlib/reactons/, scaffold starter files, and configureanalysis_options.yamlreacton create reacton <name>-- generate a writable reacton file from a templatereacton create computed <name>-- generate a computed reacton filereacton create async <name>-- generate an async reacton filereacton create selector <name>-- generate a selector reacton filereacton create family <name>-- generate a reacton family filereacton create feature <name>-- generate a full feature module (reactons file, page widget, test file)reacton graph-- scanlib/and print the dependency graph in text or DOT (Graphviz) formatreacton doctor-- check project health (dependencies,ReactonScopepresence, directory structure)reacton analyze-- detect dead reactons, circular dependencies, high complexity, and naming convention violations; supports--fixfor auto-fixing and--format jsonfor CI integration
See the CLI API Reference for full command documentation with flags, options, and example output.
reacton_devtools (DevTools Extension)
A Dart DevTools extension for runtime inspection.
Setup:
ReactonDevToolsExtension.install(store)-- register all service extensions for a store
DevTools Panels:
- Graph View -- live visualization of the reactive dependency graph with node types, levels, and subscriber counts
- Inspector -- browse all reactons, view current values, and edit writable reacton values live
- Timeline -- chronological log of all state changes with old/new values, timestamps, and propagation timing (ring buffer of 500 entries)
- Performance -- per-reacton metrics including recompute count, average propagation time, and subscriber count
Service Extensions:
ext.reacton.getGraph-- fetch the full dependency graphext.reacton.getReactonValue-- read a specific reacton valueext.reacton.setReactonValue-- write a value for live debuggingext.reacton.getReactonList-- list all reactons with metadataext.reacton.getStats-- store-level statisticsext.reacton.getTimeline-- state change history (supports incremental fetch)ext.reacton.clearTimeline-- clear history and optionally pause/resume captureext.reacton.getPerformance-- per-reacton performance data
Client Library:
ReactonDevToolsService-- typed client for calling service extensions from custom tools- Data classes:
GraphData,GraphNodeData,GraphEdgeData,ReactonValueData,ReactonListEntry,StoreStats,TimelineData,TimelineEntryData,PerformanceEntry
See the DevTools API Reference for full documentation.
reacton_generator (Code Generation)
Optional code generation for serialization and immutable state classes.
@ReactonSerializable()annotation for marking state classes- Generates
toJson()andfromJson()factory constructor for use with persistence - Generates
copyWith()for immutable state updates - Compatible with
build_runner: rundart run build_runner buildto generate - Generated files use the
.g.dartpart file convention
reacton_lint (Lint Rules)
Custom lint rules that catch common mistakes at analysis time.
| Rule | Severity | Description |
|---|---|---|
avoid_reacton_in_build | Warning | Warns when reacton(), computed(), or asyncReacton() is called inside a build() method, which creates a new reacton on every rebuild |
prefer_named_reacton | Info | Suggests adding a name parameter to reacton declarations for better DevTools and logging output |
unnecessary_reacton_rebuild | Warning | Detects widgets that call context.watch(reacton) but never use the returned value, causing unnecessary rebuilds |
Integration:
- Uses the
custom_lintpackage for IDE and CI support - Add
custom_linttoanalysis_options.yamlplugins (done automatically byreacton init) - Lint rules run in the IDE (VS Code, IntelliJ) and during
dart analyze