API Reference / @gtkx/navigation / useFocusEffect
Function: useFocusEffect()
useFocusEffect(
effect):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.
Parameters
effect
EffectCallback
Returns
void