Skip to content

API Reference / @gtkx/navigation / useFocusEffect

Function: useFocusEffect()

useFocusEffect(effect): void

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_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

Released under the MPL-2.0 License.