solidart 0.3.0 copy "solidart: ^0.3.0" to clipboard
solidart: ^0.3.0 copied to clipboard

A simple State Management solution for Dart applications inspired by SolidJS

example/main.dart

import 'dart:async';

import 'package:solidart/solidart.dart';

Future<void> main() async {
  final counter = createSignal(0);
  createEffect(
    () {
      // ignore: avoid_print
      print('The counter is now: ${counter.value}');
    },
    signals: [counter],
    fireImmediately: true,
  );

  counter.value++;

  // The signal sets the value asynchronously, so here we await for the value
  // to be notified to listeners.
  await Future<void>.value();

  // dispose the counter;
  counter.dispose();
}
60
likes
160
pub points
57%
popularity

Publisher

verified publishermariuti.com

A simple State Management solution for Dart applications inspired by SolidJS

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on solidart