@shopify/polaris
Version:
Shopify’s admin product component library
19 lines (18 loc) • 597 B
TypeScript
/**
* Similarly to the life-cycle method componentDidMount, useComponentDidMount
* will be invoked after the component has mounted, and only the initial mount.
* @param callback Defines a callback to invoke once the component has
* initially mounted.
* @example
* function Playground({active}) {
* useComponentDidMount(() => {
* if (active) {
* console.warning(`Component has mounted.`);
* }
* });
*
* return null;
* }
*/
export declare function useComponentDidMount(callback: () => void): void;
//# sourceMappingURL=use-component-did-mount.d.ts.map