A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/medz/alien-signals-dart below:

GitHub - medz/alien-signals-dart: 👾 The lightest signal library


The lightest signal library for Dart, ported from stackblitz/alien-signals.

Tip

alien_signals is the fastest signal library currently, as shown by experimental results from 👉 dart-reactivity-benchmark.

To install Alien Signals, add the following to your pubspec.yaml:

dependencies:
  alien_signals: latest

Alternatively, you can run the following command:

dart pub add alien_signals
import 'package:alien_signals/alien_signals.dart';

void main() {
  // Create a signal
  final count = signal(0);

  // Create a computed value
  final doubled = computed((_) => count() * 2);

  // Create an effect
  effect(() {
    print('Count: ${count()}, Doubled: ${doubled()}');
  });

  // Update the signal
  count(1); // Prints: Count: 1, Doubled: 2
}

See the API documentation for detailed information about all available APIs.

This project is licensed under the MIT License - see the LICENSE file for details.

This is a Dart port of the excellent stackblitz/alien-signals library.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4