react-atom-toast
Version:
Tiny & Headless toast for React
12 lines (9 loc) • 366 B
TypeScript
import { ReactElement } from 'react';
import { Root } from 'react-dom/client';
declare const MARK = "__react_root__";
type ContainerType = (Element | DocumentFragment) & {
[MARK]?: Root;
};
declare function mount(node: ReactElement, container: ContainerType): void;
declare function unmount(container: ContainerType): Promise<void>;
export { mount, unmount };