useObservableMap - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / useObservableMap hook
Watches an observable map for changes. The map is the only hook dependency.
function useObservableMap<TObservableMap extends undefined | null | INotifyMapChanged<TKey, TItem>, TKey, TItem>(
observableMap: TObservableMap
): TObservableMap
Source reference: src/hooks/UseObservableMap.ts:12
.
-
TObservableMap - The observable map type.
Type constraints:
undefined
|null
| INotifyMapChanged<TKey, TItem>. -
TKey - The type of keys the map contains.
-
TItem - The type of items the map contains.
-
observableMap: TObservableMap
The map to watch.
Returns the provided observable map.