UNPKG

nexora

Version:

A lightweight, production-ready JavaScript library for building user interfaces, supporting JSX.

14 lines (13 loc) 665 B
/** * ## onInit Lifecycle ## * @description - This function is used to register an init callback for a component. * @param initFn - The function to be executed when the component is initialized. * @returns A tuple containing the result of the init function and a function to set the result. */ export declare function onInit<T>(initFn: () => Promise<T>): [T, (newValue: T) => void]; /** * ## Execute Init Callbacks ## * @description Execute the init callbacks for a component * @param componentFn - The component function to execute the callbacks for. */ export declare function executeInitCallbacks(componentFn: Function): Map<Function, any> | undefined;