import { useRef, useEffect } from 'react'; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types

var useUnmountedRef = function useUnmountedRef() {
  var unmountedRef = useRef(false);
  useEffect(function () {
    unmountedRef.current = false;
    return function () {
      unmountedRef.current = true;
    };
  }, []);
  return unmountedRef;
};

export default useUnmountedRef;