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

sp component base.basecomponent.context

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

Home > @microsoft/sp-component-base > BaseComponent > context

BaseComponent.context property

Use the context object to access common services and state associated with the component.

Signature:

protected context: BaseComponentContext;

Remarks

Child classes are expected to override this field by redeclaring it with a specialized type. It is meant to be a read-only property; the type cannot be declared as read-only in the base class (because it is initialized outside the constructor), but child classes should redeclare it as readonly.

Clone this wiki locally