How can I call an async cleanup function in useEffect?
useEffect(() => { return () => Voice.destroy().then(Voice.removeAllListeners); }, []);The EffectCallback expects void, not Promise<void>
How can I call an async cleanup function in useEffect?
useEffect(() => { return () => Voice.destroy().then(Voice.removeAllListeners); }, []);The EffectCallback expects void, not Promise<void>