Fungsi bereaksi berjalan beberapa kali

useEffect(() => {
    <fn name>();
}, []); // This array at end stops the fn from being called several times
shahul