Реакция функция работает несколько раз
useEffect(() => {
<fn name>();
}, []); // This array at end stops the fn from being called several times
shahul
useEffect(() => {
<fn name>();
}, []); // This array at end stops the fn from being called several times