atomico
Version:
Atomico is a small library for the creation of interfaces based on web-components, only using functions and hooks.
11 lines (10 loc) • 404 B
TypeScript
export interface Hooks {
load<T>(callback: () => T): T;
cleanEffects(unmounted?: boolean): () => void;
}
/**
* create a scope for executing hooks without the need for components
* @param render - function that receives updates dispatched by useState or useReducer
* @param host - current for the useHost hook
*/
export function createHooks(render?: (result?: any) => any, host?: any): Hooks;