src/App.js
// Specify how to clean up after this effect:
Specify how to clean up after this effect.
Specify how to clean up after this effect .
function cleanup() {
            async function destroyMySky() {
                setIsLoading(true);
                try {
                    if (mySkyInstance) {
                        await mySkyInstance.destroy();
                        dispatch({type: SET_MYSKY_INSTANCE, payload: null});
                    }
                } catch (e) {
                    console.error(`Error while destroying MySky: ${e.message}`);
                } finally {
                    setIsLoading(false);
                }
            }
            destroyMySky().then(() => {
                console.debug('MySky has been destroyed.');
            });
        }
function cleanup ( ) { async function destroyMySky ( ) { setIsLoading ( true ) ; try { if ( mySkyInstance ) { await mySkyInstance . destroy ( ) ; dispatch ( { type : SET_MYSKY_INSTANCE , payload : null } ) ; } } catch ( e ) { console . error ( ` ${ e . message } ` ) ; } finally { setIsLoading ( false ) ; } } destroyMySky ( ) . then ( ( ) => { console . debug ( 'MySky has been destroyed.' ) ; } ) ; }
Specify how to clean up after this effect:
Specify how to clean up after this effect :