UNPKG

@razen-core/zenweb

Version:

A minimalist TypeScript framework for building reactive web applications with no virtual DOM

25 lines 853 B
/** * ZenWeb Renderer * Main rendering engine using vanilla JavaScript (no VDOM) */ export interface ComponentInstance { element: HTMLElement | null; container: HTMLElement | null; update: () => void; unmount: () => void; unsubscribe?: () => void; } /** * Render a component to a container element * Component should return an HTMLElement */ export declare function render(component: Function, container: HTMLElement, props?: any): ComponentInstance; /** * Create a component that auto-updates when state changes */ export declare function createComponent(component: Function, stateObj?: any, props?: any): HTMLElement; /** * Mount a component and return cleanup function */ export declare function mountComponent(component: Function, container: HTMLElement, props?: any): () => void; //# sourceMappingURL=renderer.d.ts.map