Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.ispeventobserver

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > ISPEventObserver

ISPEventObserver interface

Used with the SPEvent system, this interface is implemented by components that can subscribe to events.

Signature:

export interface ISPEventObserver extends IDisposable

Extends: IDisposable

Remarks

ISPEventObserver is an abstraction of the key features that a component must have in order to subscribe to a SharePoint Framework event: It must have instanceId and componentId information for diagnostics reporting, and it must have a way to notify the event system when the component is disposed, so that its handlers can be automatically removed. Other objects may implement this contract, as long as they meet these requirements.

Properties

Property Type Description
componentId string The component identifier, from the component's manifest.
instanceId string The instance identifier for the component.
Clone this wiki locally