react useeffect only once when a state is certain value code example
Example: react run useeffect only once
useEffect(() => {
// Initialization code comes here
}, []);
useEffect(() => {
// Initialization code comes here
}, []);