useeffect infinite loop in function called 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]);