useLayoutEffect is a hook that is confusing for many. Mostly because we're just not sure when to use it! In this tutorial, you will see the difference between useEffect and useLayoutEffect. When finished, you should also understand when to use each one. Just learning React? You should start with my full 9 hour React course here: th-cam.com/video/RVFAyFWO4go/w-d-xo.html
Have faith in JESUS CHRIST as LORD and SAVIOR for HE SAVES from hell❗️ *What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! Just Believe ❤️ Love you and GOD BLESS
Have faith in JESUS CHRIST as LORD and SAVIOR for HE SAVES from hell❗️ *What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! Just Believe ❤️ Love you and GOD BLESS
Dave thank you so much for the amazing content, always such a pleasure to learn from you. There's question that I have, that I really hope you get the chance to answer. In react 18 useEffect now renders synchronously before layout and paint when it's the result of a discrete user input such as a click. So in such cases it would behave same as useLayoutEffect, but what I can't understand is, that then what's the difference between the two in such cases? The docs mention that this only affects the timing of when the function passed to useEffect is called, and that *updates scheduled inside these effects are still deferred*, and that useLayoutEffect instead processes the updates immediately. What is meant by "updates" here and is there a way to practically test this distinction between the two in such cases (deferred vs immediately)? Very looking forward to hearing from you.
I will make more on Redux, and thank you for the request. If you are just starting with Redux, the final chapter of my React for Beginners series covers Easy Peasy Redux which is a great choice unless you are possibly considering an enterprise level application: th-cam.com/video/bfCHIibRbzg/w-d-xo.html
Good question, Arnold. I can't remember if I was using it for something in another tutorial before making this one or not, but it doesn't play a role with useLayoutEffect in this tutorial.
useLayoutEffect is a hook that is confusing for many. Mostly because we're just not sure when to use it! In this tutorial, you will see the difference between useEffect and useLayoutEffect. When finished, you should also understand when to use each one. Just learning React? You should start with my full 9 hour React course here: th-cam.com/video/RVFAyFWO4go/w-d-xo.html
UseEffect run before of Dom render and useLayoutEffect after of Dom render ???
Best explanation is only possible when the example is solid. Which actually happened here. 👍
Thank you for the kind words! 💯
It is a very good example to understand how useLayoutEffect works. Congrats!
best explanation in my opinion kudos to your sir!
Thank you!
You are the best bro!💪💪
I appreciate that! Thank you 🙏🚀
Cool, I wasn't aware of useLayoutEffect. Thanks, Dave!
Happy to help! 💯
Have faith in JESUS CHRIST as LORD and SAVIOR for HE SAVES from hell❗️
*What is the Gospel?*
The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ.
Ephesians 2:8-9
For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast.
Romans 10:9
9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved.
JESUS CHRIST can come anytime!
Just Believe ❤️ Love you and GOD BLESS
Thanks this is the best explanation ❤❤❤❤❤❤❤❤
Dave Gray + Ben Nadel === super JS!
Thank you! 🙏💯
Nice examples and explanation.
Glad you liked it! 💯
Have faith in JESUS CHRIST as LORD and SAVIOR for HE SAVES from hell❗️
*What is the Gospel?*
The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ.
Ephesians 2:8-9
For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast.
Romans 10:9
9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved.
JESUS CHRIST can come anytime!
Just Believe ❤️ Love you and GOD BLESS
Great 🎉
Dave thank you so much for the amazing content, always such a pleasure to learn from you. There's question that I have, that I really hope you get the chance to answer. In react 18 useEffect now renders synchronously before layout and paint when it's the result of a discrete user input such as a click. So in such cases it would behave same as useLayoutEffect, but what I can't understand is, that then what's the difference between the two in such cases? The docs mention that this only affects the timing of when the function passed to useEffect is called, and that *updates scheduled inside these effects are still deferred*, and that useLayoutEffect instead processes the updates immediately. What is meant by "updates" here and is there a way to practically test this distinction between the two in such cases (deferred vs immediately)? Very looking forward to hearing from you.
Dear Sir will you make video on redux?
I will make more on Redux, and thank you for the request. If you are just starting with Redux, the final chapter of my React for Beginners series covers Easy Peasy Redux which is a great choice unless you are possibly considering an enterprise level application: th-cam.com/video/bfCHIibRbzg/w-d-xo.html
why do you use sectionRef?
Good question, Arnold. I can't remember if I was using it for something in another tutorial before making this one or not, but it doesn't play a role with useLayoutEffect in this tutorial.
What is yout theme in vs code?
Github theme - several dark mode options