UNPKG

581 BTypeScriptView Raw
1declare type EffectCallback = () => undefined | void | (() => void);
2/**
3 * Hook to run an effect in a focused screen, similar to `React.useEffect`.
4 * This can be used to perform side-effects such as fetching data or subscribing to events.
5 * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often.
6 *
7 * @param callback Memoized callback containing the effect, should optionally return a cleanup function.
8 */
9export default function useFocusEffect(effect: EffectCallback): void;
10export {};
11//# sourceMappingURL=useFocusEffect.d.ts.map
\No newline at end of file