Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
13 lines
336 B
Plaintext
13 lines
336 B
Plaintext
import { useEffect, useRef } from 'react';
|
|
var useUnmountedRef = function () {
|
|
var unmountedRef = useRef(false);
|
|
useEffect(function () {
|
|
unmountedRef.current = false;
|
|
return function () {
|
|
unmountedRef.current = true;
|
|
};
|
|
}, []);
|
|
return unmountedRef;
|
|
};
|
|
export default useUnmountedRef;
|