import { useEffect, useRef } from "react";
export function useEffectCallOnlyAfterState(callback) {
  let conditions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  const currentRef = useRef(null);
  useEffect(() => {
    if (!currentRef.current) {
      currentRef.current = true;
    } else if (currentRef.current) {
      callback && callback();
    }
  }, conditions);
}