Skip to main content
Version: 2.x

Notifier.subscribe() method

@microsoft/fast-element > Notifier > subscribe

Notifier.subscribe() method

Subscribes to notification of changes in an object's state.

Signature:

subscribe(subscriber: Subscriber, propertyToWatch?: any): void;

Parameters

Parameter

Type

Description

subscriber

Subscriber

The object that is subscribing for change notification.

propertyToWatch

any

(Optional) The name of the property that the subscriber is interested in watching for changes.

Returns:

void

Remarks

Some implementation may or may not require the propertyToWatch.