react<T> method
Creates a Reactive variable and binds it automatically to this state.
This allows the reactive value to trigger setState automatically
whenever it changes.
Example:
late final counter = react(0);
ElevatedButton(
onPressed: () => counter.value++,
child: Text('${counter.value}'),
);
Implementation
Reactive<T> react<T>(T initial, [bool strict = true]) {
final r = Reactive<T>(initial, strict);
r.bind(this);
return r;
}