how to make a useEffect run once after 1sec code example Example: react run useeffect only once useEffect(() => { // Initialization code comes here }, []);