import { useAppActive, useAppInactive } from 'react-native-lifecycle';
export default function App() {
// Called when the application switches from the background to the foreground
useAppActive(() => {});
// Called when the application switches from the foreground to background
useAppInactive(() => {});
}
import {
useMount,
useShow,
useHide,
useUnmount,
useResize,
} from 'react-native-lifecycle';
export default function Page() {
// Called when the component is mounted
useMount(() => {});
// Called when the page is displayed, or when the application switches from the background to the foreground
useShow(() => {});
// Called when the page is hidden, or when the application switches from the foreground to the background
useHide(() => {});
// Called when the component is unmounted
useUnmount(() => {});
// Called after the page window resize
useResize(() => {});
}