LogoSignals.dart
Copy Markdown
rodydavis/signals.dart 999999

Type: action1

API reference and details for action1 from signals.dart.

action1#

Kind: function  |  Package: package:preact_signals

Function: action1#

R Function(A) action1(R Function(A) fn)

Wraps a 1-argument callback function in a type-safe action.

Executes fn inside a transaction-safe batch and untracked block.

Example Usage#

final setName = action1((String newName) {
  name.value = newName;
  updatedAt.value = DateTime.now();
});

References#

The action1 type is referenced and used in the following pages: