use-react-native-navigation
Version:
A utility library for a easier use of react-native-navigation library.
30 lines • 1.5 kB
TypeScript
import { ComponentDidAppearEvent, ComponentDidDisappearEvent, ModalDismissedEvent, NavigationButtonPressedEvent, ModalAttemptedToDismissEvent } from 'react-native-navigation';
/**
* ### ComponentDidAppear event listener.
*
* if targetId is provided, the effect will only run when targetId matches the incoming componentId.
*/
export declare function useComponentDidAppear(effect: (event: ComponentDidAppearEvent) => void, targetId?: string): void;
/**
* ### ComponentDidDisappear event listener.
*
* if targetId is provided, the effect will only run when targetId matches the incoming componentId.
*/
export declare function useComponentDidDisappear(effect: (event: ComponentDidDisappearEvent) => void, targetId?: string): void;
/**
* ### ModalDismissed event listener.
*
* if targetId is provided, the effect will only run when targetId matches the incoming componentId.
*/
export declare function useModalDismissed(effect: (event: ModalDismissedEvent) => void, targetId?: string): void;
/**
* ### Modal
*/
export declare function useModalAttemptedToDismiss(effect: (event: ModalAttemptedToDismissEvent) => void, targetId?: string): void;
/**
* ### NavigationButton event listener.
*
* if targetButtonId is provided, the effect will only run when targetButtonId matches the incoming buttonId.
*/
export declare function useNavigationButtonPressed(effect: (event: NavigationButtonPressedEvent) => void, targetButtonId?: string): void;
//# sourceMappingURL=useNavigationEvent.d.ts.map