UNPKG

react-native-applifecycle

Version:

⚛ Enhances the reliability of managing app lifecycles across iOS and Android platforms, ensuring consistent behavior regarding foreground and background states.

9 lines (8 loc) 411 B
import { AppStateStatus, NativeEventSubscription, AppStateEvent } from 'react-native'; export type EventHandlerType = (state: AppStateStatus) => void; declare const AndroidLifecycleModule: { addEventListener: (event: AppStateEvent, handler: EventHandlerType) => NativeEventSubscription; readonly currentState: AppStateStatus; readonly isAvailable: boolean; }; export default AndroidLifecycleModule;