rearch
1.16.1, released 2 years ago by gsconrad.com
A declarative state‑management framework with capsule‑based side effects for Flutter and Dart.
WASM-ready
What it does
ReArch lets you define state and UI as pure functions that consume capsules. It provides a side‑effect system for state updates, persistence, and dependency inversion, enabling composable, testable applications.
AI-written summary of version 1.16.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a highly testable, composable state‑management solution
- You want to avoid boilerplate and complex provider hierarchies
- You prefer a functional, hook‑style API over class‑based providers
Skip it when
- You are already comfortable with Riverpod or Provider and need no new abstraction
- You require extensive code generation or complex type inference
Strengths
- Pure function based API reduces boilerplate
- Built‑in side‑effect system for persistence and async logic
- Supports both Flutter widgets and pure Dart containers
- High testability with minimal mocking
Weaknesses
- Limited ecosystem compared to Riverpod
- Learning curve for capsule syntax
- No official code generation support
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add rearch and flutter_rearch, wrap root with RearchBootstrapper, no build_runner needed
final Capsule<(int, void Function())> countManager = capsule((CapsuleHandle use) {
final (count, setCount) = use.state(0);
return (count, () => setCount(count + 1));
});Alternatives
Packages that do the same job and could replace rearch.
Works with
Packages commonly used together with rearch: ones it builds on, ones built on it, and its own family.