useObservableCollection - Andrei15193/react-model-view-viewmodel GitHub Wiki
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
.
-
TObservableCollection - The observable collection type.
Type constraints:
undefined
|null
| INotifyCollectionChanged<TItem> | INotifyCollectionReordered<TItem>. -
TItem - The type of items the collection contains.
-
observableCollection: TObservableCollection
The collection to watch.
Returns the provided observable collection.