infinite loop from props in react useeffect code example
Example: useeffect infinite loop
//if the value update than it will render agein
useEffect(() => setCount(whatever), [value]);
//if the value update than it will render agein
useEffect(() => setCount(whatever), [value]);