react-native-inactivity-timeout
Version:
A reusable React Native hook to detect user inactivity and auto logout
12 lines (11 loc) • 415 B
TypeScript
import { PanResponderInstance } from 'react-native';
interface UseInactivityTimeoutProps {
onLogout: () => void;
checkExpiration?: () => Promise<boolean>;
timeoutDuration?: number;
alertMessage?: string;
}
export declare const useInactivityTimeout: ({ onLogout, checkExpiration, timeoutDuration, alertMessage, }: UseInactivityTimeoutProps) => {
panResponder: PanResponderInstance;
};
export {};