Javascript – how to execute requests one by one in a useEffect
I have useEffect that executes the request when changing dependences (department and two dates field). useEffect(() => { getFilteredRestReport({ date_start: formatDatePatchPoint(date[0]), date_end: formatDatePatchPoint(date[1]), department, }); }, [date, department]) When I make a request with an empty department, the request takes…