-
Notifications
You must be signed in to change notification settings - Fork 2
watchViewModel
API / watchViewModel<TViewModel> hook
In future versions this hook will be removed, switch to useViewModel.
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.
- viewModel: TViewModel, The view model to change, a view model is any object that implements INotifyPropertiesChanged.
-
watchedProperties:
readonly
Array<keyof
TViewModel>, optional, a render will be requested when only one of these properties has changed.
Motivation
Overview
Guides and Tutorials - Getting Started
Releases
API
Events
IEvent
IEventHandler
INotifyPropertiesChanged
INotifyCollectionChanged
IItemAddedEventArgs
IItemRemovedEventArgs
ICollectionChange
ItemRemovedCallback
ICollectionChange
EventDispatcher
Observable Collections
IReadOnlyObservableCollection
IObservableCollection
ReadOnlyObservableCollection
ObservableCollection
ViewModels
ViewModel
isViewModel
Forms
IFormFieldViewModel
IFormFieldViewModelConfig
FormFieldViewModel
FormFieldCollectionViewModel
FormFieldSet
DynamicFormFieldCollectionViewModel
Validation
IReadOnlyValidatable
IValidatable
IValidationConfig
ValidatorCallback
CollectionItemValidatorCallback
ValidatableSelectorCallback
ValidationConfigSelectorCallback
UnsubscribeCallback
registerValidators
registerCollectionValidators
registerCollectionItemValidators
React Hooks
EventHandler
useEvent
ViewModelType
ViewModelFactory
useViewModel
useViewModelMemo
useObservableCollection
useValidators
useCollectionValidators
useCollectionItemValidators