@excentone/spfx-react
Version:
Contains custom ReactJs components and hooks intended to use when developing SharePoint Framework (SPFx) Web components.
12 lines (10 loc) • 620 B
JavaScript
import React, { createContext } from "react";
export const ServiceScopeContext = createContext(null);
/**
* A higher-order component (HOC) for providing/cascading the ServiceScopeContext properties.
* @param props The properties to pass to the component.
* @returns A new react provider component.
* @remarks Use this instead of repeatedly calling the `ComponentContext.Provider` and providing the context.
*/
export const ServiceScopeContextProvider = ({ children, ...context }) => (React.createElement(ServiceScopeContext.Provider, { value: context }, children));
//# sourceMappingURL=ServiceScopeContext.js.map