@microsoft/fast-element > watch
watch() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Deeply subscribes to changes in existing observable objects.
Signature:
export declare function watch(object: any, subscriber: Subscriber | ((subject: any, args: any) => void)): Disposable;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
object |
any |
The observable object to watch. |
|
subscriber |
Subscriber | ((subject: any, args: any) => void) |
The handler to call when changes are made to the object. |
Returns:
A disposable that can be used to unsubscribe from change updates.