watchViewModel - Andrei15193/react-model-view-viewmodel Wiki
API / watchViewModel<TViewModel> hook
Watches the view model for changes, requesting a render when it does. The view model and watched properties are part of the hook dependencies.
function watchViewModel<TViewModel extends INotifyPropertiesChanged>(viewModel: TViewModel, watchedProperties?: readonly (keyof TViewModel))
- TViewModel: the type of view model to watch. Must implement INotifyPropertiesChanged.