useValueNotifier<T> function

ValueNotifier<T> useValueNotifier <T>([T intialData, List<Object> keys ])

Creates a ValueNotifier automatically disposed.

As opposed to useState, this hook do not subscribes to ValueNotifier. This allows a more granular rebuild.

See also:

Implementation

ValueNotifier<T> useValueNotifier<T>([T intialData, List<Object> keys]) {
  return Hook.use(_ValueNotifierHook(
    initialData: intialData,
    keys: keys,
  ));
}