For componentDidMount
useEffect(()=>{// Your code here},[]);For componentDidUpdate
useEffect(()=>{// Your code here},[yourDependency]);For componentWillUnmount
useEffect(()=>{// componentWillUnmountreturn()=>{// Your code here}},[yourDependency]);
For componentDidMount
useEffect(()=>{// Your code here},[]);For componentDidUpdate
useEffect(()=>{// Your code here},[yourDependency]);For componentWillUnmount
useEffect(()=>{// componentWillUnmountreturn()=>{// Your code here}},[yourDependency]);
For componentDidMount
useEffect(()=>{// Your code here},[]);For componentDidUpdate
useEffect(()=>{// Your code here},[yourDependency]);For componentWillUnmount