UNPKG

@vgbire/react-keep-alive

Version:
21 lines (20 loc) 739 B
import React, { ReactNode, FC } from 'react'; import { LifeCircle } from '../../types'; type LifeCircles = { [key: string]: Array<LifeCircle>; }; interface KeepAliveScopeContext { active?: string; setActive?: (active: string | ((preKey: string) => string)) => void; activateds: LifeCircles; setActivateds?: (activateds: LifeCircles) => void; deactivateds: LifeCircles; setDeactivateds?: (deactivateds: LifeCircles) => void; } declare const KeepAliveScopeContext: React.Context<KeepAliveScopeContext>; interface RouterKeepAliveProps { children: ReactNode; } export declare const KeepAliveScope: FC<RouterKeepAliveProps>; export declare const useKeepAliveScopeContext: () => KeepAliveScopeContext; export {};