This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
sp component base.basecomponent
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-component-base > BaseComponent
The base class for client-side components such as BaseClientSideWebPart or BaseExtension.
Signature:
export default abstract class BaseComponent implements ISPEventObserver
Implements: ISPEventObserver
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the BaseComponent
class.
Property | Modifiers | Type | Description |
---|---|---|---|
componentId | string | Returns the component identifier as defined in the component’s associated manifest. | |
context | BaseComponentContext | Use the context object to access common services and state associated with the component. | |
instanceId | string | A unique identifier for the instance of the component. | |
isDisposed | boolean | Returns true if the component has been already disposed. | |
manifest | IClientSideComponentManifest | Provides access to the manifest for the client-side component. virtual |
Method | Modifiers | Description |
---|---|---|
dispose() | Disposes the component. | |
onDispose() | This event method is called at the end of the component's lifecycle. It provides an opportunity to release any associated resources, cancel any outstanding requests, etc. virtual |