Skip to content
pubscout

preact_signals

7.0.0, released 6 months ago by rodydavis.com

Dart port of Preact.js Signals for fine-grained reactive state management.

WASM-ready
$ flutter pub add preact_signals
Source repository

What it does

Provides core reactive primitives like signals, computed values, and effects for managing application state. Automatically tracks dependencies and updates UI or business logic precisely without manual listeners.

AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want fine-grained reactivity without boilerplate.
  • You prefer signals over traditional widget-tree state management.
  • You are porting or matching an architecture that uses Preact signals.

Skip it when

  • Your project standardizes entirely around Riverpod, Bloc, or Provider.
  • You want automatic widget-tree rebuilding integrated directly out of the box without additional bindings.

Strengths

  • Fine-grained updates without rebuilding entire widget subtrees
  • Zero codegen required
  • Direct Dart port of a mature and proven JS signals library

Weaknesses

  • Relatively niche ecosystem in Flutter compared to Riverpod or Bloc
  • Not documented with explicit built-in Flutter widget binding helpers in the provided text

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'package:preact_signals/preact_signals.dart';

final counter = signal(0);

void main() {
  print(counter.value); // 0
  counter.value = 1;
  print(counter.value); // 1
}

Alternatives

Packages that do the same job and could replace preact_signals.

  • riverpod

    More robust ecosystem and standard for Flutter state management.

  • bloc

    Predictable event-driven architecture with strong testing utilities.

  • provider

    Simpler context-based inheritance model built into the Flutter ecosystem.

Works with

Packages commonly used together with preact_signals: ones it builds on, ones built on it, and its own family.