Skip to content

useObservableCollection

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / useObservableCollection hook

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

function useObservableCollection<TObservableCollection extends undefined | null | INotifyCollectionChanged<TItem> | INotifyCollectionReordered<TItem>, TItem>(
  observableCollection: TObservableCollection
): TObservableCollection

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

Generic Parameters

Parameters

  • observableCollection: TObservableCollection
    The collection to watch.

Returns: TObservableCollection

Returns the provided observable collection.

Clone this wiki locally