/** * Base Component class. Provides `setState()` and `forceUpdate()`, which * trigger rendering * @param {object} props The initial component props * @param {object} context The initial context from parent components' * getChildContext */ export function Component(props: object, context: object): void; export class Component { /** * Base Component class. Provides `setState()` and `forceUpdate()`, which * trigger rendering * @param {object} props The initial component props * @param {object} context The initial context from parent components' * getChildContext */ constructor(props: object, context: object); props: any; context: any; /** * Update component state and schedule a re-render. * @param {object | ((s: object, p: object) => object)} update A hash of state * properties to update with new values or a function that given the current * state and props returns a new partial state * @param {() => void} [callback] A function to be called once component state is * updated */ setState(update: any, callback?: (() => void) | undefined): void; _nextState: any; /** * Immediately perform a synchronous re-render of the component * @param {() => void} [callback] A function to be called after component is * re-rendered */ forceUpdate(callback?: (() => void) | undefined): void; _force: boolean | undefined; /** * Accepts `props` and `state`, and returns a new Virtual DOM tree to build. * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx). * @param {object} props Props (eg: JSX attributes) received from parent * element/component * @param {object} state The component's current state * @param {object} context Context object, as returned by the nearest * ancestor's `getChildContext()` * @returns {import('./index').ComponentChildren | void} */ render: typeof Fragment; } /** * @param {import('./internal').VNode} vnode * @param {number | null} [childIndex] */ export function getDomSibling(vnode: import('./internal').VNode, childIndex?: number | null | undefined): any; /** * Enqueue a rerender of a component * @param {import('./internal').Component} c The component to rerender */ export function enqueueRender(c: import('./internal').Component): void; import { Fragment } from './create-element';