Skip to content

API Reference / @gtkx/navigation / useFocusEffect

Function: useFocusEffect() ​

useFocusEffect(effect): void

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_patch_hash=6462da01ed23beee88f01d290d3714743e43d2fd84235198fcbe09501a61d1d4_react@19.2.8/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts:9

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.

Parameters ​

effect ​

EffectCallback

Returns ​

void