function TheComponent() { useEffect(() => { // do anything you want to do here. }, []) // <-- This is where you put the dependency array return <div>.....</div> }
function TheComponent() { useEffect(() => { // do anything you want to do here. }, []) // <-- This is where you put the dependency array return <div>.....</div> }