$watchEffect function

  1. @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
VoidCallback $watchEffect(
  1. VoidCallback callback
)

Sets up a reactive effect triggered by callback and returns a function to dispose of the effect when it’s no longer needed.

The watchEffect instance is automatically disposed when the widget is disposed.

Note: This is part of the deprecated defineWidget API.

Implementation

@Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
VoidCallback $watchEffect(VoidCallback callback) =>
    autoContextDisposeFn(watchEffect$(callback));