impulse 0.2.0 copy "impulse: ^0.2.0" to clipboard
impulse: ^0.2.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(), (count) => print('Count is $count'));

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

  $store.reset();
}
1
likes
160
points
126
downloads

Documentation

API reference

Publisher

verified publishervanzwolsoftware.nl

Weekly Downloads

Minimalist state management and dependency injection.

Repository (GitHub)
View/report issues

Topics

#state #reactive #dependency-injection

License

MIT (license)

Dependencies

meta

More

Packages that depend on impulse