@mittwald/react-tunnel
Version:
It's like a Portal – but with React components
15 lines • 830 B
TypeScript
import { ReactNode } from 'react';
import { ObservableMap } from 'mobx';
export type TunnelChildren = ReactNode | undefined | ((tunnelChildren?: ReactNode | undefined) => ReactNode | undefined);
export declare class TunnelState {
readonly children: ObservableMap<string, ObservableMap<string, TunnelChildren>>;
private readonly preparedChildren;
constructor();
static useNew(): TunnelState;
setChildren(tunnelId: string | undefined, entryId: string, children: TunnelChildren): void;
prepareChildren(tunnelId: string | undefined, entryId: string, children: TunnelChildren): void;
private deleteChildrenFromMap;
deleteChildren(tunnelId: string | undefined, entryId: string): void;
getChildren(tunnelId?: string): [string, TunnelChildren][] | undefined;
}
//# sourceMappingURL=TunnelState.d.ts.map