impair
Version:
impair is a React framework bringing several programming concepts together in order to provide a foundation for a layered, scalable, performant and enterprise level react application.
13 lines (12 loc) • 468 B
TypeScript
/**
* @onUnmount decorator
* @description This decorator is used to mark a method as an onUnmount method.
* It will automatically create a unmount function that will be called when the containing ServiceProvider or Component is unmounted
* @example
* \@onUnmount
* unmount() {
* // do something
* }
*/
export declare function onUnmount(target: any, propertyKey: string): void;
export declare function getOnUnmountMethods(instance: any): (() => void)[];