import { useEffect, useRef } from "react";
const useUpdateEffect = (effect, deps) => {
  const isMounted = useRef(false);
  useEffect(() => {
    return () => {
      isMounted.current = false;
    };
  }, []);
  useEffect(() => {
    if (!isMounted.current) {
      isMounted.current = true;
    } else {
      return effect();
    }
    return void 0;
  }, deps);
};
var stdin_default = useUpdateEffect;
export {
  stdin_default as default
};
