import { useEffect, useRef } from "react";

export function useEffectCallOnlyAfterState(callback,conditions=[]) {
    const currentRef = useRef(null);
    useEffect(() => {
      if (!currentRef.current) {
        currentRef.current = true;
      }
      else if(currentRef.current){
        callback && callback(); 
      }
    }, conditions );
}