diff --git a/src/index.ts b/src/index.ts index ff8c353..e70b8c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import { AppState, AppStateStatus } from 'react-native'; import { useFocusEffect, useNavigation } from '@react-navigation/native'; type EffectCleanup = undefined | void | (() => void); -type EffectCallback = () => EffectCleanup; +type EffectCallback = () => EffectCleanup | Promise; const cleanupIfNeeded = (cleanup: RefObject) => { if (cleanup && cleanup.current && typeof cleanup.current === 'function') {