UNPKG

mcfe-react-lib

Version:

Mount/unmount React components flexibly with React 17 or 18 support

18 lines (16 loc) 598 B
interface ICreateInitial<IRoot = any> { _root: IRoot | null; mount: (selector: string) => void; unmount: () => void; } interface IReactDOMAdapter { render: (element: JSX.Element, container: Element) => any; unmount: (container: Element, root: any) => void; } type TReactDOMAdapterFunction = (ReactDOM: any) => IReactDOMAdapter; interface ICreateComponentSuspenseOptions { className?: string; mcfeId?: string; LoadingComponent?: React.ComponentType<any>; } export type { ICreateComponentSuspenseOptions, ICreateInitial, IReactDOMAdapter, TReactDOMAdapterFunction };