UNPKG

666 BTypeScriptView Raw
1import * as React from 'react';
2import { BaseWidget, Message } from './widget';
3import { Widget } from '@phosphor/widgets';
4import { Root } from 'react-dom/client';
5export declare abstract class ReactWidget extends BaseWidget {
6 protected nodeRoot: Root;
7 constructor(options?: Widget.IOptions);
8 protected onUpdateRequest(msg: Message): void;
9 /**
10 * Render the React widget in the DOM.
11 * - If the widget has been previously rendered,
12 * any subsequent calls will perform an update and only
13 * change the DOM if absolutely necessary.
14 */
15 protected abstract render(): React.ReactNode;
16}
17//# sourceMappingURL=react-widget.d.ts.map
\No newline at end of file