UNPKG

preact

Version:

Fast 3kb React alternative with the same modern API. Components & Virtual DOM.

26 lines (19 loc) 787 B
/* @flow */ import { createElement, cloneElement, createRef, Component, type Node } from 'react'; declare var h: typeof createElement; declare function render(vnode: Node, parent: Element, toReplace?: Element): Element; export { h, createElement, cloneElement, createRef, Component, render }; export default { h, createElement, cloneElement, createRef, Component, render }; declare type VNode<P> = { nodeName: string | Function, children: Array<VNode<P> | string>, key?: string | number | void, attributes: P, }; declare export function rerender(): void; declare export var options: { syncComponentUpdates?: boolean, vnode?: (vnode: VNode<any>) => void, debounceRendering?: (rerender: () => void) => void, event?: (event: Event) => Event | void, };