Learn useEffect In 13 Minutes

  Рет қаралды 812,279

Web Dev Simplified

Web Dev Simplified

4 жыл бұрын

🚨 IMPORTANT:
Full React Course: courses.webdevsimplified.com/...
1 Year Free Hosting: www.atlantic.net/webdevsimpli...
Use code KYLE for an additional $50
In this video I cover everything you need to know about the useEffect hook. I compare this hook to the old way of doing things with lifecycle methods in class components so you can understand how to start using hooks effectively in your projects. This is part of a series of React videos where I cover all the important hooks in React.
📚 Materials/References:
useState Video: • Learn useState In 15 M...
useEffect Blog Article: blog.webdevsimplified.com/202...
React Hooks Playlist: • React Hooks
🧠 Concepts Covered:
- How to use hooks in React
- How to convert class lifecycle methods to function effects with useEffect
- How to use the useEffect hook
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
#ReactJs #WDS #useEffect

Пікірлер: 772
@romaniecumtehului6792
@romaniecumtehului6792 3 жыл бұрын
I paid money for a full react course on udemy and after every hook I "learn" from there, I come to your channel to see it reexplained better. 😅
@bishnudas3562
@bishnudas3562 3 жыл бұрын
course by whom?
@yudhochristin
@yudhochristin 2 жыл бұрын
Me too! hahah!
@slayer5171
@slayer5171 2 жыл бұрын
Yes, me too..
@anhqui19822011
@anhqui19822011 2 жыл бұрын
Me too. lol
@luizsoares4847
@luizsoares4847 2 жыл бұрын
Lol me 2
@ThatGuyAnonymous
@ThatGuyAnonymous 4 жыл бұрын
You have the gift of breaking down any difficult topics in a way that everyone can understand. I wish there was a super like button on KZbin 👍
@TheImprenditore
@TheImprenditore 3 жыл бұрын
I thought so too, he can probably bundle this up and make it into an in-person bootcamp and charge 15k per head.
@underlecht
@underlecht 3 жыл бұрын
yes, he is that guy.
@cba88
@cba88 3 жыл бұрын
super like from here
@KanchanSharma-bg2yh
@KanchanSharma-bg2yh 3 жыл бұрын
I saw many videos on hooks before, but this one only makes me understand completely in detail and in first attempt only. Thank you so much.
@deansprivatearchive
@deansprivatearchive 3 жыл бұрын
The subscribe button.
@aaronmotacek9343
@aaronmotacek9343 2 жыл бұрын
One note at 5:00 for people newer to React. If you try to update state with setState (setResourceType in this case), but the value is the same as the current state, it won't trigger a rerender. This is because of the way the React team has chosen to implement useState (it helps to prevent unnecessary rerenders). This can become an issue when your state is an array (or an object), as you can mutate the array, try to update state, and it may not trigger a rerender because React thinks the array is the same (since the array reference is the same). You can solve this issue by using the spread operator (...) to create a truly new array or object: setState([...array]) or setState({...object}). More info on that at if you Google something like "usestate update not always triggering rerender component"
@nemanjastankovic941
@nemanjastankovic941 Жыл бұрын
Thanks for this heads-up. It's something really useful to know
@prince5922
@prince5922 Жыл бұрын
Correction: if you use _setState_ it will always re-render.
@vapeurdepisse
@vapeurdepisse Жыл бұрын
I found that out early on. There is this rule in React that "one simply doesn't mutate state" and it applies to hooks as well. React uses Object.is() to check for equality between the previous state and the new state, and if you mutate an array or object, it is still the same object and so it won't update.
@mrmartinwatson1
@mrmartinwatson1 Жыл бұрын
@@prince5922 no
@tmode9303
@tmode9303 Жыл бұрын
@@prince5922 No, it the value is same as before it won't re render. You need to spread
@user-hs2so8zo9m
@user-hs2so8zo9m 6 ай бұрын
I knew he was going to be good when he starred directly into my soul
@michaelbarbarelli3764
@michaelbarbarelli3764 Жыл бұрын
The fact that the clean-up code runs before the event listener is a key point that's rarely communicated in docs, tutorials, etc. Very well done!
@lukas.webdev
@lukas.webdev 9 ай бұрын
Yes, I agree 100%! 😉
@loneWolff1995
@loneWolff1995 3 ай бұрын
Can you explain Two things why App being rendered twice, when you click post twice, I mean when you clicked first time, I understand app being rendered, but when you clicked again on Post. The app shouldn't get rendered as state is already same. Second why useEffect ran twice, even though you are not using StrictMode *Kindly help !!!!*
@zentaitamas
@zentaitamas 3 жыл бұрын
This is the most understandable explanation I’ve ever found. Good job mate and thanks.
@chandrakant6283
@chandrakant6283 2 жыл бұрын
Extremely Useful, I've just picked up react and these small doses of lectures are really making the difference. Thanx, Kyle.
@johnnielondon9840
@johnnielondon9840 9 ай бұрын
I’ve now watched a couple of your videos for different react hooks and they’re great. Really clear and to the point. Thank you Kyle
@darwinduranalba2539
@darwinduranalba2539 3 жыл бұрын
dude I wish I had met this channel sooner. You're amazing
@woodyboy123
@woodyboy123 3 жыл бұрын
You are the best man. So quick and easy to understand when you teach it. Can't believe I've been putting off taking the time to learn hooks when all it would have taken was a 13 minutes with you👍🏼
@learningdevelopment7429
@learningdevelopment7429 3 жыл бұрын
You are incredible! I'm self taught and employed as a full stack engineer, so I've been able to find some high quality tutorials on my journey. But you my friend, are truly an incredible teacher on intermediate/advanced language topics and I hope you continue to keep making these vids!
@makanmusty
@makanmusty 3 жыл бұрын
ditto man! hes a beast!!
@extrouzex1070
@extrouzex1070 3 жыл бұрын
This guy is really awesome, talking too slowly but telling a lot of the topic for making it much easier, love u man 💚
@riturathinsharma5931
@riturathinsharma5931 3 жыл бұрын
You are a genius. The way you explain things and connect the dots is simply awesome. It is very easy to connect to what you explain and easily get accustomed to new technology . Great Going bro, keep it up :)
@rishabhtripathi6465
@rishabhtripathi6465 3 жыл бұрын
Kyle is the best ,he explains so much things in a very time span.Other channels sometimes confuses me with so much mess.
@ThiagoVieira91
@ThiagoVieira91 4 жыл бұрын
Hey Kyle thank you for this new series. I've been a rough time trying to study steadily while working from during this quarantine. This new series got me back on track. Waiting for the next episode!
@mohdsameer8899
@mohdsameer8899 6 ай бұрын
What do you do now just curious 🧐
@Alanm1963
@Alanm1963 3 жыл бұрын
Simple clear explanation of the basic concepts. Very helpful. Thank you.
@user-yz5hj3zg2x
@user-yz5hj3zg2x Жыл бұрын
FINALLY!! After reviewing a ton of tutorials and explanations, I could finally understand what this hook was for! Thanks a lot!
@dimaster5880
@dimaster5880 4 жыл бұрын
Wow, this is the best explanation I have ever seen so far. My respect.
@Hidiho2u
@Hidiho2u Жыл бұрын
I understand more in the last 30 minutes than I did 8 hours of lectures and workshops ago. Thank you so much!
@calarcher4869
@calarcher4869 Жыл бұрын
every video of yours i search for because I am trying to understand a seemingly impossible concept, I leave 15 minutes later having a great understanding. 100% live up to your name, Web Dev Simplified
@tomaszkapalka
@tomaszkapalka 3 жыл бұрын
As always: simple and clear explanation! Thanks!
@gabrielaperez42
@gabrielaperez42 2 жыл бұрын
This video is incredible, thank you for explain so easier topics that seem impossible to understand!!
@marikabasagoitia6828
@marikabasagoitia6828 Жыл бұрын
As usual, thank you so much for your explanations. By far the best resource for web development on KZbin!
@is-sam
@is-sam 2 жыл бұрын
You are awesome man! You explain things in a very simple and comprehensive manner, thank you :)
@SitaMbili
@SitaMbili 2 жыл бұрын
This video makes useEffect so clear and I feel like I finally understand it now thanks to you!
@IMChristianLowe
@IMChristianLowe 2 жыл бұрын
I'm primarily a backend/infrastructure dev and have been struggling with some very basic React concepts. I watched your useState video first and you did a fantastic job breaking it down and simplifying it so that my smooth brain could understand it. You've done a fantastic job here too. Well done!
@veoquenoesunproblema
@veoquenoesunproblema 2 жыл бұрын
Man, I have the same issue, of course I'm just a student right not, but the useState was a killer video for me. With that video I understood a lot of react but this useEffect is mind blowing, really funny how a lot of people love React but it is kind of complex to get it when you advance to the second page which is like, man is this so freaking easy? hah
@alexcastro9157
@alexcastro9157 2 жыл бұрын
@@veoquenoesunproblema That is because people are learning ONLY React, which relays on JS, pretty much. Good video, however this guy like almost ALL people try to assign the lifecycle to useEffect. But it is not pretty much the case because functional components behavior different from react classes, Dan explained in its blog ALL DETAILS. Also this guy does not talk about Closures and why it is important to know them... (Course because people do not learn javascript but react)....
@23Kattayopp
@23Kattayopp Ай бұрын
Kyle, every single time I feel that I don't understand something as good as I'd want, either it's html/css/js or react, I go and search a video on that subject from you. It's been a year and a half and it worked every single time. And I want to thank you for that! You're awesome.
@bigeddie1994
@bigeddie1994 2 жыл бұрын
Any time I watch your videos, you connect the dots for me. Thank you for everything.
@go_all_the_way
@go_all_the_way Жыл бұрын
you're a life saver and amazing teacher
@GoddessofWarr
@GoddessofWarr 2 жыл бұрын
So clear... I was struggling with this concept, now it's ok, thank you very muck Kyle !
@lloyd_jvr9152
@lloyd_jvr9152 4 жыл бұрын
Amazing video thanx Kyle actually going to start using hook now!
@awesomejs
@awesomejs 4 жыл бұрын
So many times used useEffect but now i understand properly, respect for you sir.
@filipozbolt
@filipozbolt 2 жыл бұрын
6 minutes of this video and i understand use Effect, something that i didnt understand in one hour lesson. Thank you very much 😊
@johnyepthomi892
@johnyepthomi892 3 жыл бұрын
Thank you man. Keep making these types of videos. I love them all. Very cool precise and clear. No b.s.
@siddharthmehta6966
@siddharthmehta6966 2 жыл бұрын
This is the best explanation one can get on internet !!!! Simply wow . Thanks for the tutorial
@Aresqn87
@Aresqn87 3 жыл бұрын
The best REACT explanation on KZbin. Thanks.
@niloben659
@niloben659 10 ай бұрын
Once again knocking it out of the ballpark
@badrivelamurasokan837
@badrivelamurasokan837 3 жыл бұрын
You definitely have the teacher mindset. Really clear!
@BobbyBundlez
@BobbyBundlez 3 жыл бұрын
wow. never seen state being used to fetch data dynamically like that with the press of one button! awesome!
@anmolsharma433
@anmolsharma433 4 жыл бұрын
yo man hats off to you man you can break any complex topic into simple pieces love your vids man.
@cevatmorcicek9134
@cevatmorcicek9134 Жыл бұрын
Thank you so much!!The examples were quite easy to understand.I got it so well.I wish you the best!
@phantom7132
@phantom7132 4 жыл бұрын
Simple and no clutter, great one.
@non-stereotypicalprogramme3666
@non-stereotypicalprogramme3666 3 жыл бұрын
Thanks for this video. Fast, simply and well explained
@fithamlakfikrie4657
@fithamlakfikrie4657 Жыл бұрын
Thank you very much 🙏, It was a very clear explanation with sufficient but short examples.
@shakirbaba3978
@shakirbaba3978 2 жыл бұрын
You tone is so smooth I can understand you code without looking at screen. Thanks for such great videos
@yumisunday7088
@yumisunday7088 2 жыл бұрын
Great explanation of something i always found very abstract, thanks!
@Aaronmoreno
@Aaronmoreno 3 жыл бұрын
Your channel is a game changer. Thanks Kyel!
@michaelNXT1
@michaelNXT1 Жыл бұрын
You're the best, I'm starting to learn React Native and I'm looking forward to have my questions answered by you!
@dhashdev
@dhashdev 2 жыл бұрын
You have the perfect articulation. Great stuff, thanks.
@geraldoagohoue3132
@geraldoagohoue3132 3 жыл бұрын
Thank you. I fully understand React hooks in really really 13 mins.
@shadmanmartinpiyal4057
@shadmanmartinpiyal4057 3 жыл бұрын
wow.. that clean up thing just blew my mind. I have been a react developer for a while now, still didn't know this. Well everyday we learn, we grow.
@rickeyupadhyay6898
@rickeyupadhyay6898 Жыл бұрын
I just love the way you explain Very straight forward!
@scottmacnevin3555
@scottmacnevin3555 3 жыл бұрын
Excellent examples, very clear explanations, thanks!
@numberoneBORON
@numberoneBORON 2 жыл бұрын
You have a gift man, I really understand when I watch your videos!
@madsidification
@madsidification Жыл бұрын
Dude you explained is so easily, simply amazing man 🔥
@cafuune
@cafuune Жыл бұрын
was struggling all day with this thing, now its like crystal clear lol thank youuuu
@DeepakSingh-sy4ws
@DeepakSingh-sy4ws 3 жыл бұрын
i have no words which can appreciate your work.
@kal1nadam205
@kal1nadam205 7 ай бұрын
amazing explanation in such a short video, thank you!
@debanjansinha3750
@debanjansinha3750 3 жыл бұрын
man u are awesome the way u explain things in a simple manner really helps a lot for the people keep up doing the good stuff..
@snovich
@snovich 2 жыл бұрын
close to nine months not understanding useEffect, thans for your help. It was the best one
@pranavp4122
@pranavp4122 Жыл бұрын
Thank you Kyle...... Your video is very helpful for the beginners like us!
@mohammednawar5447
@mohammednawar5447 4 жыл бұрын
Thanks Kyle, Amazing tutorial
@melkerlarsson4219
@melkerlarsson4219 4 жыл бұрын
Thank you! Such a great tutorial!!
@CristianEscudero
@CristianEscudero 3 жыл бұрын
Thanks man, you save me reading about side effects in the docs haha :). Cheers.
@kejor8617
@kejor8617 3 жыл бұрын
very good tutorial! I understood this sentence and i hope that I will make bigger progress! Thank you!
@csrescued1299
@csrescued1299 3 жыл бұрын
very much comprehensive and intuitive video, Great work thank you :)
@naveedalirehmani4135
@naveedalirehmani4135 2 жыл бұрын
Great explanation as always, Thank you very much!
@xadasol8692
@xadasol8692 3 жыл бұрын
Wow, super easy to follow along, thank you for sharing this with us :) Subscribed!
@rodrigom.castilho4095
@rodrigom.castilho4095 3 жыл бұрын
Solved a massive pain in the ass 4 minutes, 6 seconds in. Best subscription I ever made here.
@bigbabyg
@bigbabyg Жыл бұрын
honestly, along with this dope explanation, i recommend just reading the react docs, they are well explained and easy to digest.
@Jos3M08
@Jos3M08 3 жыл бұрын
Incredible help, thanks Kyle!
@mashaisalive
@mashaisalive Жыл бұрын
один из немногих на ютубе, кто реально понятно объясняет. god bless him
@mikestanley18
@mikestanley18 3 жыл бұрын
Your videos are very easy to understand. Thanks for the content.
@SouradeepBasuTechsavvy
@SouradeepBasuTechsavvy 4 жыл бұрын
Man you literally are a god to me! I learn more from you than at University!
@darentok8608
@darentok8608 Жыл бұрын
Thank you for this. Finally understood useEffect and useState
@tapstothebeat
@tapstothebeat Жыл бұрын
3 different YT videos taught me how to use the useEffect hook but I only learnt it when I saw your video.
@hniehslimi2894
@hniehslimi2894 Жыл бұрын
This is the most understandable explanation I’ve ever seen
@MrVipulLal
@MrVipulLal 2 жыл бұрын
Love your videos. Explanations are clear
@uhlysssuh
@uhlysssuh 3 жыл бұрын
Very simple explanation, thanks!
@ikhtiyorkhikmatov6316
@ikhtiyorkhikmatov6316 Жыл бұрын
Best explanation, found exact answers about how does effect actually work
@anafilipasilvamendes5025
@anafilipasilvamendes5025 2 жыл бұрын
This was a great explanation! Thank you!
@user-wm7el6sq2j
@user-wm7el6sq2j 9 ай бұрын
Really great explanation! Thank you!
@aladdinoscopy
@aladdinoscopy 2 жыл бұрын
Great rundown. Thank you man.
@frankenfishdom
@frankenfishdom 6 ай бұрын
thanks for breaking this down so well, I finally understand what's going on!
@rohitchaudhry4355
@rohitchaudhry4355 2 жыл бұрын
Best explnation I have come across for the react hooks !!
@shahrukhziaallahwala9092
@shahrukhziaallahwala9092 3 жыл бұрын
Thanks, you made this easier for me to understand
@SakhawatHossainlive
@SakhawatHossainlive 3 жыл бұрын
Awesome explanation. You made my task easy
@BinaryGear
@BinaryGear 4 ай бұрын
Fantastic tutorial as always!
@JosephLKausi
@JosephLKausi 11 ай бұрын
Wow thank you, bro, now I have a clear idea on useEffect
@Lingchao2596
@Lingchao2596 Жыл бұрын
One of the best tutorials ever
@raajkumar8739
@raajkumar8739 2 жыл бұрын
Your videos are too great, I have no words to thank enough.👍👍🙌🙌
@zouhairsahtout9682
@zouhairsahtout9682 11 ай бұрын
Thank you so much you really did explained the 'clean up' and how it works exactly, and that is always useEffect run the returns first so if you have any event listener already should gets deleted so you don't ends up with another event listener, if your useEffect gonna create an event listener to listen for something. God bless you man
@lukas.webdev
@lukas.webdev 9 ай бұрын
Yeah, that's a very important point! 😉
@receptaylanhan
@receptaylanhan Жыл бұрын
Thank you Kyle so clear explanations.
@TheAssasinsBreed
@TheAssasinsBreed 3 жыл бұрын
great video. great explanation. thanks WDS!
@authenticnaturalnoises
@authenticnaturalnoises 4 жыл бұрын
bro you are the best in explaining things!!!
@derekvre
@derekvre 4 жыл бұрын
very concise and well explained!
@javadmh7827
@javadmh7827 Жыл бұрын
Great explanation 👌
@leadeeeeer
@leadeeeeer 3 жыл бұрын
Amazing Explanation. Thank you
@funk1473
@funk1473 2 жыл бұрын
Fantastic video... thank you for the trenchant explanations!
@sambacarlson
@sambacarlson Жыл бұрын
You are a Genius man! 💯👌and you really really know how to explain. Thank you man
Learn useMemo In 10 Minutes
10:42
Web Dev Simplified
Рет қаралды 465 М.
Mastering React's useEffect
25:20
Jack Herrington
Рет қаралды 171 М.
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 15 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 5 МЛН
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 3,3 МЛН
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 7 МЛН
Learn useState In 15 Minutes - React Hooks Explained
15:45
Web Dev Simplified
Рет қаралды 1,1 МЛН
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 164 М.
useEffect Hook in React JS in Hindi in 2020 #54
16:15
Thapa Technical
Рет қаралды 208 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 73 М.
Beginner React.js Coding Interview (ft. Clément Mihailescu)
36:31
Ben Awad
Рет қаралды 2,1 МЛН
Learn Regular Expressions In 20 Minutes
20:52
Web Dev Simplified
Рет қаралды 1,2 МЛН
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 454 М.
Learn React Hooks: useEffect - Simply Explained!
14:07
Cosden Solutions
Рет қаралды 115 М.
React Query Is (Still) Essential - My Favorite React Library
11:04
Theo - t3․gg
Рет қаралды 142 М.
Learn useRef in 11 Minutes
10:20
Web Dev Simplified
Рет қаралды 619 М.
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 15 МЛН