Learn useEffect In 13 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น • 784

  • @ThatGuyAnonymous
    @ThatGuyAnonymous 4 ปีที่แล้ว +656

    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 TH-cam 👍

    • @TheImprenditore
      @TheImprenditore 4 ปีที่แล้ว +9

      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 4 ปีที่แล้ว +6

      yes, he is that guy.

    • @cba88
      @cba88 3 ปีที่แล้ว +4

      super like from here

    • @KanchanSharma_LiveWithArete
      @KanchanSharma_LiveWithArete 3 ปีที่แล้ว +8

      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 ปีที่แล้ว +4

      The subscribe button.

  • @aaronmotacek9343
    @aaronmotacek9343 2 ปีที่แล้ว +429

    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 2 ปีที่แล้ว +9

      Thanks for this heads-up. It's something really useful to know

    • @prince5922
      @prince5922 2 ปีที่แล้ว +2

      Correction: if you use _setState_ it will always re-render.

    • @vapeurdepisse
      @vapeurdepisse 2 ปีที่แล้ว +9

      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 2 ปีที่แล้ว +1

      @@prince5922 no

    • @tmode9303
      @tmode9303 2 ปีที่แล้ว +1

      @@prince5922 No, it the value is same as before it won't re render. You need to spread

  • @michaelbarbarelli3764
    @michaelbarbarelli3764 ปีที่แล้ว +54

    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 ปีที่แล้ว +1

      Yes, I agree 100%! 😉

    • @loneWolff1995
      @loneWolff1995 10 หลายเดือนก่อน +1

      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 !!!!*

    • @nithishm.r201
      @nithishm.r201 หลายเดือนก่อน +1

      @@loneWolff1995 14
      I think this is because of React.StrictMode. This only happens in development. If you remove React.StrictMode you will get only 1 log.

  • @patricktkinter
    @patricktkinter ปีที่แล้ว +20

    I knew he was going to be good when he starred directly into my soul

  • @learningdevelopment7429
    @learningdevelopment7429 4 ปีที่แล้ว +150

    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 ปีที่แล้ว +5

      ditto man! hes a beast!!

  • @romaniecumtehului6792
    @romaniecumtehului6792 3 ปีที่แล้ว +412

    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. 😅

  • @philcatterall
    @philcatterall 2 ปีที่แล้ว +3

    Superb. Merry Christmas !!

    • @WebDevSimplified
      @WebDevSimplified  2 ปีที่แล้ว +3

      Wow. Thank you so much for your incredibly generous donation. I am honestly speechless. I hope you have a merry Christmas as well!

  • @IMChristianLowe
    @IMChristianLowe 3 ปีที่แล้ว +22

    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 3 ปีที่แล้ว +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 3 ปีที่แล้ว

      @@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)....

    • @muhammadhafizuddin2965
      @muhammadhafizuddin2965 2 หลายเดือนก่อน

      @@veoquenoesunproblemayess, bcs react brings a lot of new concept that differs from how js works. I also having a quite hard time when learning it, because we built enterprise app and the last project uses angular. So for this new project, i have to learn react and next js as that is what have been chosen by the architect.

    • @muhammadhafizuddin2965
      @muhammadhafizuddin2965 2 หลายเดือนก่อน

      @@alexcastro9157yes, bcs this guy is not teaching js so ofc he wont talk abt closures. Closure is not react, its vanilla js.

  • @darwinduranalba2539
    @darwinduranalba2539 3 ปีที่แล้ว +24

    dude I wish I had met this channel sooner. You're amazing

  • @zentaitamas
    @zentaitamas 3 ปีที่แล้ว +32

    This is the most understandable explanation I’ve ever found. Good job mate and thanks.

  • @23Kattayopp
    @23Kattayopp 8 หลายเดือนก่อน

    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.

  • @dimaster5880
    @dimaster5880 4 ปีที่แล้ว +33

    Wow, this is the best explanation I have ever seen so far. My respect.

  • @calarcher4869
    @calarcher4869 2 ปีที่แล้ว

    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

  • @Hidiho2u
    @Hidiho2u ปีที่แล้ว +1

    I understand more in the last 30 minutes than I did 8 hours of lectures and workshops ago. Thank you so much!

  • @user-yz5hj3zg2x
    @user-yz5hj3zg2x 2 ปีที่แล้ว +1

    FINALLY!! After reviewing a ton of tutorials and explanations, I could finally understand what this hook was for! Thanks a lot!

  • @KaranSharma-ew7io
    @KaranSharma-ew7io 3 ปีที่แล้ว +22

    Everything about you is cool , from hairstyle to voice to explanation

    • @gunnarMyTube
      @gunnarMyTube 3 ปีที่แล้ว

      Learn from the enlightened

  • @hniehslimi2894
    @hniehslimi2894 ปีที่แล้ว +1

    This is the most understandable explanation I’ve ever seen

  • @cafuune
    @cafuune ปีที่แล้ว +1

    was struggling all day with this thing, now its like crystal clear lol thank youuuu

  • @tapstothebeat
    @tapstothebeat ปีที่แล้ว +1

    3 different YT videos taught me how to use the useEffect hook but I only learnt it when I saw your video.

  • @rishabhtripathi6465
    @rishabhtripathi6465 4 ปีที่แล้ว +2

    Kyle is the best ,he explains so much things in a very time span.Other channels sometimes confuses me with so much mess.

  • @zouhairsahtout9682
    @zouhairsahtout9682 ปีที่แล้ว +1

    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 ปีที่แล้ว

      Yeah, that's a very important point! 😉

  • @riturathinsharma5931
    @riturathinsharma5931 4 ปีที่แล้ว +7

    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 :)

  • @darkdevilxy457
    @darkdevilxy457 2 ปีที่แล้ว +1

    I have to say this is the best explanation of react hook

  • @manoranjands9479
    @manoranjands9479 ปีที่แล้ว +1

    Finally I understood the concept...wow what a way of teaching man...! So simple and understandable. Thank you so much

    • @lukas.webdev
      @lukas.webdev ปีที่แล้ว

      I agree! 😉

    • @user-gq1ij
      @user-gq1ij ปีที่แล้ว

      ​​@@lukas.webdevAt 10:00, how is useEffect called, even though the array is empty and having no change

  • @Lingchao2596
    @Lingchao2596 ปีที่แล้ว +1

    One of the best tutorials ever

  • @snovich_117
    @snovich_117 3 ปีที่แล้ว

    close to nine months not understanding useEffect, thans for your help. It was the best one

  • @ThiagoVieira91
    @ThiagoVieira91 4 ปีที่แล้ว +23

    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 ปีที่แล้ว

      What do you do now just curious 🧐

  • @BobbyBundlez
    @BobbyBundlez 4 ปีที่แล้ว +8

    wow. never seen state being used to fetch data dynamically like that with the press of one button! awesome!

  • @shakirbaba3978
    @shakirbaba3978 3 ปีที่แล้ว

    You tone is so smooth I can understand you code without looking at screen.
    Thanks for such great videos

  • @brannonmay
    @brannonmay 2 ปีที่แล้ว +1

    Any time I watch your videos, you connect the dots for me. Thank you for everything.

  • @extrouzex1070
    @extrouzex1070 4 ปีที่แล้ว +2

    This guy is really awesome, talking too slowly but telling a lot of the topic for making it much easier, love u man 💚

  • @mashaisalive
    @mashaisalive ปีที่แล้ว +1

    один из немногих на ютубе, кто реально понятно объясняет. god bless him

  • @rodrigom.castilho4095
    @rodrigom.castilho4095 4 ปีที่แล้ว

    Solved a massive pain in the ass 4 minutes, 6 seconds in. Best subscription I ever made here.

  • @cristianouzumaki2455
    @cristianouzumaki2455 4 ปีที่แล้ว +3

    I would like to know from those who disliked like exactly what did you not like. This is one of the best useffect exp out there.

    • @riyadzaigirdar5394
      @riyadzaigirdar5394 4 ปีที่แล้ว

      He didn't explain the why it renders, bacause the state changed..and also print 2 renders so...one for the jsx other for the state change....and he should have also shown an example of setTimeOut in Useeffect

    • @cristianouzumaki2455
      @cristianouzumaki2455 4 ปีที่แล้ว +1

      @@riyadzaigirdar5394 If you are trying to learn a hooks concept it's logical that you know basic react concepts like state change impact and setTimeout is a js concept, why learn react when one is not aware of js concepts.

    • @riyadzaigirdar5394
      @riyadzaigirdar5394 4 ปีที่แล้ว

      Those are morons, dont think of them...they will have more "why's" in life then "yes"

  • @millicentmalinga962
    @millicentmalinga962 10 หลายเดือนก่อน

    The name of the channel really speaks for itself. Thank you for this

  • @chandrakant6283
    @chandrakant6283 2 ปีที่แล้ว +1

    Extremely Useful, I've just picked up react and these small doses of lectures are really making the difference.
    Thanx, Kyle.

  • @awesomejs
    @awesomejs 4 ปีที่แล้ว

    So many times used useEffect but now i understand properly, respect for you sir.

  • @filipozbolt
    @filipozbolt 3 ปีที่แล้ว +1

    6 minutes of this video and i understand use Effect, something that i didnt understand in one hour lesson. Thank you very much 😊

  • @siddharthmehta6966
    @siddharthmehta6966 2 ปีที่แล้ว

    This is the best explanation one can get on internet !!!! Simply wow . Thanks for the tutorial

  • @marikabasagoitia6828
    @marikabasagoitia6828 2 ปีที่แล้ว +1

    As usual, thank you so much for your explanations. By far the best resource for web development on TH-cam!

  • @niloben659
    @niloben659 ปีที่แล้ว +1

    Once again knocking it out of the ballpark

  • @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.

  • @johnnielondon9840
    @johnnielondon9840 ปีที่แล้ว

    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

  • @bigbabyg
    @bigbabyg 2 ปีที่แล้ว

    honestly, along with this dope explanation, i recommend just reading the react docs, they are well explained and easy to digest.

  • @JosephLKausi
    @JosephLKausi ปีที่แล้ว +1

    Wow thank you, bro, now I have a clear idea on useEffect

  • @afiqk8543
    @afiqk8543 ปีที่แล้ว

    This man is awesome. Even his cat 10:32 understands what he is teaching 🐱

  • @numberoneBORON
    @numberoneBORON 2 ปีที่แล้ว

    You have a gift man, I really understand when I watch your videos!

  • @SouradeepBasuTechsavvy
    @SouradeepBasuTechsavvy 4 ปีที่แล้ว +2

    Man you literally are a god to me! I learn more from you than at University!

  • @AdamElMou
    @AdamElMou 3 ปีที่แล้ว +1

    I never comment but wow. You're like a gift to the internet, thank u, rlly

  • @0x-Aras
    @0x-Aras 3 ปีที่แล้ว

    The best REACT explanation on TH-cam. Thanks.

  • @badrivelamurasokan837
    @badrivelamurasokan837 3 ปีที่แล้ว +1

    You definitely have the teacher mindset. Really clear!

  • @cevatmorcicek9134
    @cevatmorcicek9134 ปีที่แล้ว +1

    Thank you so much!!The examples were quite easy to understand.I got it so well.I wish you the best!

  • @go_all_the_way
    @go_all_the_way 2 ปีที่แล้ว +6

    you're a life saver and amazing teacher

  • @michaelNXT1
    @michaelNXT1 2 ปีที่แล้ว

    You're the best, I'm starting to learn React Native and I'm looking forward to have my questions answered by you!

  • @GoddessofWarr
    @GoddessofWarr 3 ปีที่แล้ว +1

    So clear... I was struggling with this concept, now it's ok, thank you very muck Kyle !

  • @SohamNag12321
    @SohamNag12321 6 หลายเดือนก่อน

    You are the reason I know React! 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..

  • @rohitchaudhry4355
    @rohitchaudhry4355 3 ปีที่แล้ว

    Best explnation I have come across for the react hooks !!

  • @fithamlakfikrie4657
    @fithamlakfikrie4657 ปีที่แล้ว +1

    Thank you very much 🙏, It was a very clear explanation with sufficient but short examples.

  • @SitaMbili
    @SitaMbili 3 ปีที่แล้ว +1

    This video makes useEffect so clear and I feel like I finally understand it now thanks to you!

  • @whathappenedthere592
    @whathappenedthere592 ปีที่แล้ว +1

    one of the best explanations ever...loved it

  • @maksymdudyk1718
    @maksymdudyk1718 3 ปีที่แล้ว

    Kyle is the best tech influencer in the universe.

  • @DeepakSingh-sy4ws
    @DeepakSingh-sy4ws 4 ปีที่แล้ว +1

    i have no words which can appreciate your work.

  • @woodyboy123
    @woodyboy123 4 ปีที่แล้ว

    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👍🏼

  • @anilpgonade8503
    @anilpgonade8503 ปีที่แล้ว +1

    The best explanation, great job man

  • @anmolsharma433
    @anmolsharma433 4 ปีที่แล้ว

    yo man hats off to you man you can break any complex topic into simple pieces love your vids man.

  • @MatthewPostrel
    @MatthewPostrel ปีที่แล้ว

    Much better explanation than my Udemy course... Thanks!

  • @ikhtiyorkhikmatov6316
    @ikhtiyorkhikmatov6316 2 ปีที่แล้ว

    Best explanation, found exact answers about how does effect actually work

  • @rushi2996
    @rushi2996 29 วันที่ผ่านมา

    bro you are staring me right into my soul XD thnx for breaking down the topic btw i understood the hook fully

  • @먼데이좋은데이
    @먼데이좋은데이 2 ปีที่แล้ว

    You are a blessing to noob web developers like me.

  • @shaybatman7108
    @shaybatman7108 3 ปีที่แล้ว

    This is the best channel on youtube!

  • @gmzcj
    @gmzcj 4 ปีที่แล้ว

    He isn't joking when he says his job is to simplified the web. Very easy to follow!

  • @BionicPanda7
    @BionicPanda7 ปีที่แล้ว +1

    Great video man.

  • @s.bamahfoodh
    @s.bamahfoodh ปีที่แล้ว +1

    that was really great. I feel like I understand ever slightly more

  • @adityanjsg99
    @adityanjsg99 2 ปีที่แล้ว

    Presentation Level, Ultra Pro Max!

  • @frankenfishdom
    @frankenfishdom ปีที่แล้ว

    thanks for breaking this down so well, I finally understand what's going on!

  • @archdetective
    @archdetective 2 ปีที่แล้ว +1

    I had better luck with you than my prof. Thanks a lot!

  • @DKMRFCBrlz
    @DKMRFCBrlz 3 ปีที่แล้ว +3

    Hey bro great tutorial, really simple actually haha.
    I felt a little awkward with you looing straight at the camera though LOL, but your hair is amazing, keep it going!

    • @zaeshanvlogs3746
      @zaeshanvlogs3746 3 ปีที่แล้ว

      the dude stares straight into your soul lmaooo, great teacher thoo

  • @is-sam
    @is-sam 3 ปีที่แล้ว +1

    You are awesome man! You explain things in a very simple and comprehensive manner, thank you :)

  • @heyamjoe
    @heyamjoe 2 ปีที่แล้ว

    I always look forward to the intro tune, it's soothing.

  • @pranavp4122
    @pranavp4122 2 ปีที่แล้ว

    Thank you Kyle...... Your video is very helpful for the beginners like us!

  • @gabrielaperez42
    @gabrielaperez42 3 ปีที่แล้ว

    This video is incredible, thank you for explain so easier topics that seem impossible to understand!!

  • @xingyoong7129
    @xingyoong7129 3 ปีที่แล้ว

    This is awesome, good example, good explanation, way more better than udemy course

  • @sambacarlson
    @sambacarlson 2 ปีที่แล้ว +1

    You are a Genius man! 💯👌and you really really know how to explain. Thank you man

  • @lukasostar3008
    @lukasostar3008 4 ปีที่แล้ว

    god fucking damn it these are the best videos on yt on this topic
    i'm an experienced dev, but just started learhing js and react, and these are, up untill now, by far THE BEST vids to get you quickly into the juicy stuff.
    thank you

  • @mxolisingwenya5486
    @mxolisingwenya5486 2 ปีที่แล้ว

    The best and clear explanation ever

  • @sushi_lesushi
    @sushi_lesushi 2 ปีที่แล้ว +1

    2 questions: starting from 4:47, why you have 2 "render" printed in your console, when you have 1 console.log("render") in your code? And at 5:00 when you changed your clicked button to "posts"- "resource type changed" vs "render" were printed. When you clicked second time in a row the "posts" button, "render" was printed again and "resource type changed" was not, which is understandable according to your explanations, but your subsequent clicks on "posts" did not trigger useSatet hook (if "render" was not printed). I understood why useEffect didn't work, but didn't understand why console.log("render") didn't work as well, although it rendered when you clicked "posts" 2 times in a row

    • @jallavarshith5196
      @jallavarshith5196 21 วันที่ผ่านมา

      2 years later ik but, at 4:47, what happens is, whenever a state is changed, useEffect runs, ofc. but also the whole function "App" runs again, cause you know, component re-rendering.
      we by default use strict mode in react, what it does is, whenever re-render happens it runs the whole function twice. so it simulates a mount-unmount-remount cycle, this helps developers catch bugs or side effects.
      so the functions runs twice everytime a re-render is made (useState triggers re-rendered when state is changed)

  • @souvikdas3636
    @souvikdas3636 4 ปีที่แล้ว

    Hey man you're awesome, thanks for teaching useEffect, look bro you're getting a lot of hate from clement and algo expert worshippers for making that video about fang, dont feel sad about it ok. We are with you. Let those haters keep hating. You rock

  • @Alanm1963
    @Alanm1963 4 ปีที่แล้ว

    Simple clear explanation of the basic concepts. Very helpful. Thank you.

  • @kal1nadam205
    @kal1nadam205 ปีที่แล้ว

    amazing explanation in such a short video, thank you!

  • @sameer.bhardwaj7585
    @sameer.bhardwaj7585 ปีที่แล้ว +1

    Bro does look like someone named Kyle. Love your content

  • @yauhenistankevich3503
    @yauhenistankevich3503 3 หลายเดือนก่อน

    those 15 minutes videos gave me more understanding than a week of self learning😁

  • @johnyepthomi892
    @johnyepthomi892 4 ปีที่แล้ว

    Thank you man. Keep making these types of videos. I love them all. Very cool precise and clear. No b.s.

  • @coltgar2465
    @coltgar2465 4 ปีที่แล้ว

    You are my go to channel when I need to learn

  • @rickeyupadhyay6898
    @rickeyupadhyay6898 2 ปีที่แล้ว

    I just love the way you explain Very straight forward!

  • @ahancho
    @ahancho 3 ปีที่แล้ว

    unrelated comment but your hair looks incredible in terms of style, volume and shine

  • @sammcalilly107
    @sammcalilly107 2 ปีที่แล้ว

    this helped me learn how i've been improperly using hooks. thanks!

  • @madsidification
    @madsidification 2 ปีที่แล้ว

    Dude you explained is so easily, simply amazing man 🔥

  • @Ar-rp8jo
    @Ar-rp8jo 2 ปีที่แล้ว +5

    Kyle we have an empty array as the second parameter in useEffect() which helps to prevent useEffect after every render. Here in the above code which you have used, we have empty array in two cases : 1- 5:25 and 2- 10:07 as parameter for useEffect()....... useEffect is not called when the state(resourceType) changes in case 1 but, in case 2 useEffect is called for every render (state change - windowWidth) even when we passed the empty array [ ] as a parameter. Can you please explain the difference?

    • @eightyeightdays
      @eightyeightdays 2 ปีที่แล้ว +6

      In the second example UseEffect isn't being used to handle a state change, but is there to add an event listener.
      The event listener is added once on mount, and from that point on is listening for changes to the screen size.
      So in the second example it's not UseEffect that's being called on every change, but the handleResize function assigned to the event listener.

    • @josephquintiliano2904
      @josephquintiliano2904 ปีที่แล้ว +1

      Pretend useEffect() is a person also coding the application with you , and they did their job "typing out lines of code" on the FIRST render, and since its dependency array is empty, it dosent have to "type it again", and when you clean useEffect(), it's like asking one of two things... "hey delete all your code so the next time you start typing it's on a clean slate " or two, "hey thanks for adding your code, we dont need it anymore so please delete it!"
      In Example 2, useEffect() is NOT running on every rerender, but the lines of code it implemented to your file on the INITIAL render is what we see being invoked every time

    • @rajibkhan8964
      @rajibkhan8964 ปีที่แล้ว

      thanks
      @@josephquintiliano2904

  • @darentok8608
    @darentok8608 2 ปีที่แล้ว

    Thank you for this. Finally understood useEffect and useState