expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
11 lines (10 loc) • 529 B
TypeScript
type EffectCallback = () => undefined | void | (() => void);
/**
* Hook to run an effect in a focused screen, similar to `React.useEffect`.
* This can be used to perform side-effects such as fetching data or subscribing to events.
* The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often.
*
* @param callback Memoized callback containing the effect, should optionally return a cleanup function.
*/
export declare function useFocusEffect(effect: EffectCallback): void;
export {};