useeffect infinite loop with dependencies code example
Example 1: infinite loop useEffect
useEffect(() => {
setIngredients({});
}, []);
Example 2: useeffect infinite loop
//if the value update than it will render agein
useEffect(() => setCount(whatever), [value]);