// Your reactive journey starts here
import 'package:alien_signals/alien_signals.dart';
final welcome = signal('π Welcome to Alien Signals!');
effect(() => print(welcome()));Alien Signals is a reactive state management library that brings the power of signals to Dart and Flutter applications. Originally inspired by StackBlitz's alien-signals, our Dart implementation provides:
- πͺΆ Ultra Lightweight: Minimal overhead, maximum efficiency
- π― Simple API: Intuitive
signal(),computed(), andeffect()functions - π§ Production Ready: Battle-tested through comprehensive beta releases
import 'package:alien_signals/alien_signals.dart';
void main() {
// Create reactive state
final count = signal(0);
// Create derived state
final doubled = computed((_) => count() * 2);
// Create side effects
effect(() {
print('Count: ${count()}, Doubled: ${doubled()}');
});
// Update state - triggers all dependencies
count.set(1); // Output: Count: 1, Doubled: 2
}- Effect Scopes: Group and manage effects together
- Batch Operations: Control when reactivity updates occur
- Flexible API: Both high-level presets and low-level system access
To install Alien Signals, add the following to your pubspec.yaml:
dependencies:
alien_signals: ^2.0.1Alternatively, you can run the following command:
dart pub add alien_signals- Solidart - Signals for Flutter inspired by SolidJS
- Oref - Magical reactive state management for Flutter
- flutter_compositions - Vue-inspired reactive building blocks for Flutter
Join our thriving community of developers building reactive applications with Alien Signals!
- API Documentation - Complete API reference
- Examples - Code examples and demos
- Migration Guide - Upgrade instructions