In the first case, the timeout value is simply the number of milliseconds to wait before executing the callback function. In the second case, the timeout value is the result of evaluating the function expression. The function expression will be evaluated each time the callback function is executed.
Finally understanding React with your examples 👌
What an explanation Sam🤗
This playlist is great and has put react in a new light. Is it possible to have the code of useEffect examples as for the other videos? Thanks.
I just added the code examples: smw.wtf/useeffect-everything-you-need-to-know
very helpful! thank you.
Awesome tutorial. Just a question, difference between setTime(time + 1) VS setTime(t => t+1) ?
In the first case, the timeout value is simply the number of milliseconds to wait before executing the callback function. In the second case, the timeout value is the result of evaluating the function expression. The function expression will be evaluated each time the callback function is executed.
You’re on fire Sam! 🔥
nice
🔥🔥🔥