@excentone/spfx-react
Version:
Contains custom ReactJs components and hooks intended to use when developing SharePoint Framework (SPFx) Web components.
26 lines (25 loc) • 985 B
TypeScript
import { ISPPageUrls } from "@excentone/spfx-core-lib";
import { BaseComponentContext } from "@microsoft/sp-component-base";
/**
* The properties of a React component context rendered by an SPFX Web component (WebPart/Extensions) that can be used by the React components and its children components.
* This provides an easy way to access the common objects used by components without passing it down to child components (a.k.a property drilling).
* @see https://medium.com/swlh/avoid-prop-drilling-with-react-context-a00392ee3d8
*/
export interface IComponentContextProps {
/**
* A reference to the component context of the SPFx web component.
*/
spfxContext: BaseComponentContext;
/**
* A reference to the properties of the web part/application extension.
*/
properties: any;
/**
* Whether `debug mode` is enabled or not.
*/
enableDebugMode: boolean;
/**
* The list of page urls.
*/
pageUrls: ISPPageUrls;
}