next-easy-keepalive
Version:
It is an easy-to-use keepAlive library exclusively for nextjs.
19 lines (18 loc) • 742 B
TypeScript
import React from 'react';
import { BackControlType } from '../../types';
import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context';
import { NextRouter } from 'next/dist/client/router';
import { BaseRouter } from 'next/dist/shared/lib/router/router';
interface PropsType {
children: React.ReactNode;
router: BaseRouter | NextRouter | AppRouterInstance;
alwaysRemember?: boolean;
maxPage?: number;
}
export declare const BackControlContext: React.Context<{
current: BackControlType;
alwaysRemember: boolean;
maxPage: number;
}>;
export declare const KeepAliveProvider: ({ children, router, alwaysRemember, maxPage }: PropsType) => JSX.Element;
export default KeepAliveProvider;