UNPKG

react-global-comp

Version:

A class for create global react component api

14 lines (11 loc) 374 B
import { ComponentType } from 'react' declare class ReactGlobalComp<Props extends Record<string, any>> { readonly id: string readonly comp: ComponentType<Props> readonly preProps: Props ref?: any constructor(id: string, comp: ComponentType<Props>) render(props?: Partial<Props>): Promise<unknown> destroy(): Promise<unknown> } export default ReactGlobalComp