UNPKG

564 BTypeScriptView Raw
1import type { NavigationAction } from '@react-navigation/routers';
2/**
3 * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen.
4 *
5 * @param preventRemove Boolean indicating whether to prevent screen from being removed.
6 * @param callback Function which is executed when screen was prevented from being removed.
7 */
8export default function usePreventRemove(preventRemove: boolean, callback: (options: {
9 data: {
10 action: NavigationAction;
11 };
12}) => void): void;
13//# sourceMappingURL=usePreventRemove.d.ts.map
\No newline at end of file