diff --git a/src/useInteractionManager.ts b/src/useInteractionManager.ts index 1317f19c..c3be940c 100644 --- a/src/useInteractionManager.ts +++ b/src/useInteractionManager.ts @@ -5,9 +5,14 @@ export function useInteractionManager() { const [complete, updateInteractionStatus] = useState(false) useEffect(() => { - InteractionManager.runAfterInteractions(() => { + const {cancel} = InteractionManager.runAfterInteractions(() => { updateInteractionStatus(true) }) + + return () => { + cancel?.() + } }, []) + return complete }