//whenever `name` or `data` change, `useEffect` will be triggered useEffect(()=>{ //TODO: Do your logic here }, [data, name])