only run useeffect 2 time in react code example Example: react run useeffect only once useEffect(() => { // Initialization code comes here }, []);