I am trying to understand the useEffect hook in-depth.
useEffect
I would like to know when to use which method and why?
1.useEffect with no second
3.useEffect with some arguments passed in the second parameter useEffect(()=>{},[arg])
it will run first then it will run again if arg change
Your forget also to ask what about the return inside the useEffect... Its uses for cleanup it will run when component dismount