UNPKG

mcfe-react-lib

Version:

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

23 lines (20 loc) 1.1 kB
import React from 'react'; import { ICreateInitial, ICreateComponentSuspenseOptions } from './type.mjs'; declare const MountComponent: (props: { initial: ICreateInitial; className?: string; mcfeId?: string; }) => JSX.Element; declare const CreateMountComponent: (initial: ICreateInitial) => (props: any) => JSX.Element; declare const CreateComponent: (loading: Promise<any>) => React.LazyExoticComponent<(props: any) => JSX.Element>; declare const CreateComponentModule: (loading: Promise<any>, error?: React.ComponentType<any>) => Promise<{ default: (props: any) => JSX.Element; } | { default: () => JSX.Element; }>; declare const CreateComponentLazy: (loading: Promise<any>) => React.LazyExoticComponent<(props: any) => JSX.Element>; declare const CreateComponentSuspense: <TProps extends { className?: string; mcfeId?: string; }>(loading: Promise<any>, options?: ICreateComponentSuspenseOptions) => (props: TProps) => JSX.Element; export { CreateComponent, CreateComponentLazy, CreateComponentModule, CreateComponentSuspense, CreateMountComponent, MountComponent };