Skip to content

useObservableSet

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions
API / useObservableSet hook

Watches an observable set for changes. The set is the only hook dependency.

function useObservableSet<TObservableSet extends undefined | null | INotifySetChanged<TItem>, TItem>(
  observableSet: TObservableSet
): TObservableSet

Source reference: src/hooks/UseObservableSet.ts:11.

Generic Parameters

  • TObservableSet - The observable set type.

    Type constraints: undefined | null | INotifySetChanged<TItem>.

  • TItem - The type of items the set contains.

Parameters

  • observableSet: TObservableSet
    The set to watch.

Returns: TObservableSet

Returns the provided observable set.

Clone this wiki locally