I have called an API when focusing a screen in React Native mobile app. But I need to call that API only after 30 seconds from previous API call. I mean, if I go into that screen multiple times within a 1 min, that API should be called only for two time.
useFocusEffect(useCallback(() => { getProfileDetails() }, []));
This is the current way I have called for the API. This API will be called after focusing that screen.
Is there any possibility to do that kind of thing in React Native?