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.

18 lines (17 loc) 620 B
import { AppStateStatus, AppStateEvent, NativeEventSubscription } from 'react-native'; import type { EventHandlerType } from './AndroidLifecycleModule'; declare const AppLifecycle: { /** * Adds an event listener to the app lifecycle events. */ addEventListener(event: AppStateEvent, handler: EventHandlerType): NativeEventSubscription; /** * Returns the current app state. */ readonly currentState: AppStateStatus; /** * Returns whether the app lifecycle module is available on the current platform. */ readonly isAvailable: boolean; }; export default AppLifecycle;