run function only once after reload in react instead of useEffect code example
Example: react run useeffect only once
useEffect(() => {
// Initialization code comes here
}, []);
useEffect(() => {
// Initialization code comes here
}, []);