UNPKG

react-next-keep-alive

Version:
16 lines (15 loc) 591 B
import React, { ReactElement } from 'react'; import { KeepAliveName, KeepAliveOptsProps } from './provider'; type KeepAliveProps = { children: ReactElement; }; declare const withKeepAlive: (Component: (props?: Object) => JSX.Element, name: KeepAliveName, opts?: KeepAliveOptsProps) => { (props: KeepAliveProps): React.JSX.Element; getInitialProps: any; keepAlive: { name: KeepAliveName; keepScrollEnabled: boolean | undefined; applyNewProps: boolean | ((cachedProps: any, newProps: any) => Object) | undefined; }; }; export default withKeepAlive;