LogoSignals.dart
Copy Markdown
rodydavis/signals.dart 999999

Type: action2

API reference and details for action2 from signals.dart.

action2#

Kind: function  |  Package: package:preact_signals

Function: action2#

R Function(A, B) action2(R Function(A, B) fn)

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

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

Example Usage#

final updateProfile = action2((String newName, int newAge) {
  name.value = newName;
  age.value = newAge;
});

References#

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