signals_core
7.0.0, released 6 months ago by rodydavis.com
Fine-grained reactivity library for modeling state and business logic in Dart.
What it does
Exposes core functions and classes to model business logic with fine-grained reactivity, lazy evaluation, and surgical updates. Tracks dependencies automatically and frees them when no longer needed.
AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want fine-grained reactivity without code generation.
- You are building business logic that can be shared across Flutter and non-Flutter Dart projects.
Skip it when
- You prefer structured architectural patterns like BLoC or standard Provider-based approaches.
- You do not want to manage options classes for configuration in version 7.0.0+.
Strengths
- 100% Dart Native and framework agnostic.
- Lazy evaluation computes values only when read.
- Fine-grained tracking prevents unnecessary widget or computation rebuilds.
Weaknesses
- Requires learning a signals-based mental model.
- Breaking changes in 7.0.0 require refactoring constructors and options configurations.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:signals_core/signals_core.dart';
final counter = signal(0);
void main() {
effect(() {
print('Count: ${counter.value}');
});
counter.value++;
}Alternatives
Packages that do the same job and could replace signals_core.
- riverpod
Provides compile-safe, robust state management tailored extensively for Flutter applications.
99Compare - bloc
Enforces strict separation of concerns using events and states with predictable state transitions.
92Compare - provider
Simpler, inherited-widget based dependency injection and state propagation.
81Compare
Works with
Packages commonly used together with signals_core: ones it builds on, ones built on it, and its own family.
- preact_signalssignals_core depends on itDart port of Preact.js Signals for fine-grained reactive state management.
- signals_flutterBuilt on signals_coreFine-grained reactive state management library for Flutter using signals.
- signalsBuilt on signals_coreReactivity made simple. Do more by doing less. Supports Flutter and any Dart project including HTML/JS, CLI, Shelf Server, VM and more.
- bloc_signalsBuilt on signals_coreState management library bridging BLoC semantics with signals primitives.