impulse 0.1.0 copy "impulse: ^0.1.0" to clipboard
impulse: ^0.1.0 copied to clipboard

Minimalist state management and dependency injection.

example/impulse_example.dart

import 'package:impulse/impulse.dart';

final counterRef = Ref((store) => Counter());

class Counter extends ImpulseNotifier {
  int count = 0;

  void increment() {
    count += 1;
    notify();
  }
}

void main() async {
  $store.watch(counterRef(), (counter) => print('Count is ${counter.count}'));

  $store.get(counterRef()).increment();

  $store.reset();
}
1
likes
0
points
143
downloads

Publisher

verified publishervanzwolsoftware.nl

Weekly Downloads

Minimalist state management and dependency injection.

Repository (GitHub)
View/report issues

Topics

#state #reactive #dependency-injection

License

unknown (license)

Dependencies

meta

More

Packages that depend on impulse