UNPKG

react-singletons

Version:

React Singletons brings the singleton pattern to React components. This module allows applications to create components that live outside of your application with shared states for popups and overlays.

12 lines 462 B
import { ComponentType } from "react"; export declare class Singleton<IProps> { protected component: ComponentType<any>; private scwInstance?; private unmountDelayHandle; private updateDelayHandle; constructor(component: ComponentType<any>); mount(props: IProps): Singleton<IProps>; update(props: IProps, delayMs?: number): Singleton<IProps>; unmount(delayMs?: number): Singleton<IProps>; } //# sourceMappingURL=Singleton.d.ts.map