Understanding State & Handling Events in React | Complete React Course in Hindi #7

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ • 926

  • @CodeWithHarry
    @CodeWithHarry  3 роки тому +466

    Maza aa raha hai na? Hope you understood state in react
    For optimal learning, make sure to access, save and bookmark this playlist now: ua-cam.com/play/PLu0W_9lII9agx66oZnT6IyhcMIbUMNMdt.html

  • @adwaitbokade2890
    @adwaitbokade2890 3 роки тому +230

    harry your react series is more addictive than clash of clans

  • @Aditya-cx3oe
    @Aditya-cx3oe 11 місяців тому +7

    Key Takeaways for quick navigation:
    12:20 🔄 Handling State in React:
    - State in React is managed using the `useState` hook.
    - State variables are declared using array destructuring, e.g., `const [text, setText] = useState('Enter text here')`.
    - Updating state should be done using the provided updater function (e.g., `setText(newText)`), not directly.
    14:13 🖱 Handling Events in React:
    - Events like `onClick` and `onChange` are handled using functions in React.
    - Event handling functions, like `handleUpClick`, can be defined to execute actions on events.
    19:24 🔄 Updating State Based on User Input:
    - State variables can be updated based on user input, such as changing a text value in a text area.
    - Use the `onChange` event to track changes in input and update the state accordingly.
    20:48 ⬆ Updating State with Derived Values:
    - State can be updated with values derived from existing state, like converting text to uppercase before setting it.
    - Example: `setText(newText.toUpperCase())`.
    23:39 🎣 Introduction to React Hooks:
    - `useState` is just one of the many React Hooks available.
    - React Hooks provide additional functionalities, making the development of applications in React more efficient and organized.

  • @FutureeeBillionaireee
    @FutureeeBillionaireee Рік тому +129

    What i also learned today from this video are as written below:
    1. State=condition of any component for eg. textarea component might be empty sometime , sometimes it has letters .
    2. Hooks= A method which helps us to use features of classes in function based component this is because developer like us prefer to use function over classes.
    3. Hooks has this part ----> const [count,setCount)=useState("Hello Universe");
    Here in above hook the value of count is Hello Universe . count is array variable so that we just can't update or change its value like normal variable.
    But we can update or change its value using setCount() method. i.e. setCount("Hey You"); this implies the value of count is updated to Hey You.
    What is inside this mini project and what i do?
    ---> Project provides mini textarea and 2/3 buttons like UpperCase, LowerCase, No. of letters. we change the text value according to the buttons instruction using state and event.
    Its more simple as we use onClick={ClickFunction) and we define its functionality as well.
    Note : Advantages of hooks and this stuff , whenever you click Uppercase button page does not reload. Which enhances its capability. IMP*

  • @pysharora
    @pysharora 3 роки тому +48

    Literally took courses on udemy and other teaching platforms. the content which harry bhai provides is way too better to understand and grasp things to learn. would recommend this to literally everyone who wants to learn react.

  • @reshmamandavkar5827
    @reshmamandavkar5827 Рік тому +7

    This is best React series ever found on you tube. Thank you soo much Harry to make this easy for us.
    Keep up the Good work !!

  • @12stdcommerce18
    @12stdcommerce18 3 роки тому +78

    Harry is not inspiration he is real hero in program ♥️

  • @abdulrehmaan153
    @abdulrehmaan153 2 роки тому +1

    Waah yaar! Nahi append krna pada, nahi document select, programmer keliye bhi easy to make and application kitni hi zyada light weight aur as fast as FLASH jaise banegi... 🖤🖤🖤
    I was a big fan of harry n now of react.js too 🔥🔥🔥

  • @codewithswarnodip1811
    @codewithswarnodip1811 3 роки тому +42

    Two videos in a single day. Hats off to you.

    • @NaryVip
      @NaryVip 3 роки тому +2

      4

    • @amitkapoor9692
      @amitkapoor9692 3 роки тому

      Ye video phle hi bna li hoti hai

    • @awAmirWarsi
      @awAmirWarsi 2 роки тому +1

      @@amitkapoor9692 bhaot aasan hai aap ke liye aap ka bhi loi channel hai ya hawa me bate karte ho

    • @amitkapoor9692
      @amitkapoor9692 2 роки тому

      @@awAmirWarsimere channel hone se kya hai jo bat thi vo bta di maine

  • @politicswithrajariaz7791
    @politicswithrajariaz7791 Рік тому +4

    Harry brother, you are doing a great job, I have seen this kind of effort to make people understand. I visited multiple platforms to learn react but believe me that was just a waste of time for me. It is for the first time that my all concepts for props and state are cleared! Love from Pakistan!!!!!!

  • @EngrZardariSaddamHussain
    @EngrZardariSaddamHussain 3 роки тому +4

    This is the second thing I am learning from you, You are an amazing Teacher!

  • @PiyushKumar-nf4lf
    @PiyushKumar-nf4lf 3 роки тому +12

    I just watched last class second time to revise and now after one reload i got this video
    Thank you so much harry bhai
    and please give me a heart i never got a heart from you❤❤😢😢

    • @PiyushKumar-nf4lf
      @PiyushKumar-nf4lf 3 роки тому

      Thanks sir i am your most biggest subscriber and first time got a heart from you cann't believe
      thank you sir

    • @carotshorts6467
      @carotshorts6467 3 роки тому

      myc

  • @mansurishamim5666
    @mansurishamim5666 3 роки тому +16

    You are such a great human being sir. The best coding tutor for me is you Harry Sir. Hats off to your work and dedication.

  • @kunalbhayana
    @kunalbhayana 2 роки тому +1

    Thanks

  • @bijayghosh6128
    @bijayghosh6128 2 роки тому +21

    Hello Harry Bhaiya. I am a slow learner, so have to watch your video atleast 5 times to understand the concepts in detail and also have to read the react documentation line by line. But at the end I must say, till lecture 7(my current watching) everything is crystal clear .
    thank you Bhaiya

    • @ananyakashyap4759
      @ananyakashyap4759 Рік тому +2

      If you are taking time to learn React, probably you should first do the JavaScript course in this channel itself. That's what I did. So after completing JS, I resumed my learning of React now

    • @jagankumarpatra
      @jagankumarpatra Рік тому +2

      @@ananyakashyap4759 its feeling very hard to understand

  • @kamendragupta9122
    @kamendragupta9122 Рік тому +1

    East or west harry bhai is the best from todays morning i am trying to understand react from others but i am unable to understand a single concept correctly but now after watching this react playlist i got everything in my mind 👍

  • @adarshanand2073
    @adarshanand2073 2 роки тому +23

    I really find the way you explained the concept in such an easy and efficient way. Most of the tutorials uses big and advance words to show off but this one hit different. Thanks for the concept man 🔥

  • @nottttyyyyyy
    @nottttyyyyyy 3 місяці тому +2

    4:56 sir apne jsx wali video mai bola tha ke ham 'for' ka use nhi kar skte iski jagah 'htmlFor' ka use hoga but compiled aur render without kisi error ke ho gya aap explain kar sakte hai iss cheez ko and thnx sir this one of the best react course ❤❤ 4:56

  • @gopal8911
    @gopal8911 2 роки тому +4

    Harry , I'm so happy that i found your channel. I was learning React from one of the very famous online learning app(I'm not going to disclose app's name) but i was unable to strong my basics of react. I used to write every thing hand coded when i initially leared html css and plain javascript and when i decided to learn react, that online course and app was not able to clear my bascis as beginner in react. This is 7th video i'm watching from your channel and trust me , my most of the basic doubts has been already clear. Thank you so much. I'M SUPER POSITIVE THAT I'LL LEARN MANY SKILLS FROM YOUR VIDEOS. Thanks again for sharing in such a fun way. I like when you make us laugh too in between videos. Big heart ♥♥♥♥♥♥♥♥♥♥

  • @ranjeetsinghtharu5375
    @ranjeetsinghtharu5375 3 роки тому

    Harry Bhai is a great mentor because .,,,,,, state in react ko rutunga nahi balki deemag may rawkhunga!

  • @learningfuture7957
    @learningfuture7957 3 роки тому +5

    I watched the react in 1 video but I didn't get much but it gave me a good purpose to start exploring more creativity by Harry, and now I'm watching this playlist. one word superb.
    although one word is not much for you.
    love from Pakistan.❤️

    • @imnemo2327
      @imnemo2327 3 роки тому

      Aur bhai kaha pohonche

    • @learningfuture7957
      @learningfuture7957 3 роки тому

      @@imnemo2327 abhi university ka kaam kr rha hon isay pause kya hao ha. agr ap ka ps time ha isay follow krtay rho INSHA ALLAH beneficial ho ga bohut.

    • @imnemo2327
      @imnemo2327 3 роки тому

      @@learningfuture7957 ma wese inko nahi thapa technical playlist follow kr rha wo mast ha aur ap bhi check kro is playlist sa behtar i think

    • @learningfuture7957
      @learningfuture7957 3 роки тому

      @@imnemo2327 ok thank you. I'll surly check it

    • @_.Mustafa._
      @_.Mustafa._ 3 роки тому +1

      @@imnemo2327 Yeah, I just watched the Thapa video on useState, he explained way better than Harry.

  • @KaisanFacts
    @KaisanFacts 2 роки тому +2

    the best example ever so far...........❤❤❤❤❤❤❤

  • @mdanas7189
    @mdanas7189 Рік тому +4

    in place of "value ",we can use "placeholder " so that we don't have to create "onChange "function

  • @sanchitanagnandy
    @sanchitanagnandy 3 роки тому +1

    Harry Bhai mai ek student hu aur main apke channel se hi 2-3 saal se coding sikh raha hu. Main baas upko meri heartfelt gratitude janana chahata hu.
    PS: Mujhe aapse dil chahie

  • @vaibhavbisht9649
    @vaibhavbisht9649 Рік тому +4

    whenever i click on my "convert on uppercase button" the text in the text area converts to upper case, but the page automatically reloads and could not hold output, how can I fix it.

    • @brijeshkumarchavda
      @brijeshkumarchavda Рік тому +1

      Is that any warning in the console or terminal it is showing?

    • @Palestinepakistan786
      @Palestinepakistan786 8 місяців тому

      use preventaaaadefault(); in function that hold the page to reload

    • @aliyankhan2806
      @aliyankhan2806 4 місяці тому

      @@brijeshkumarchavda no

  • @amanr007
    @amanr007 3 роки тому +1

    The best Course hai yeeeeeeeeeee i loved it. till now i understand each and everything.

  • @mr.anonymous1994
    @mr.anonymous1994 3 роки тому +3

    Bhai jaldese like karo 😍😀😀😀

  • @harishshete6917
    @harishshete6917 2 роки тому +2

    I am loving this course, Thanks a loooooot for mmaking this course. This a gift for the self learners like me 😍😍

  • @iambiggestfanofavneetkaur2661
    @iambiggestfanofavneetkaur2661 3 роки тому +5

    thank you so much harry bhai

  • @shi-nee7966
    @shi-nee7966 3 роки тому +1

    For the algorithem. Altho i bought a course on udemy before this course started but i know harry bhai's the best. So im liking and commenting on every video for the algo.

  • @dhruvluvani
    @dhruvluvani 3 роки тому +5

    6:47 state meaning starts from here
    thanks me later

  • @DattPanchal
    @DattPanchal 3 роки тому +1

    Thank you Harry bhai.. Aapki vajah se me bohot kuch sikha hu ❤️❤️❤️

  • @pradipbhume6098
    @pradipbhume6098 2 роки тому +11

    Hi Harry, This is really appreciable that you have put lots of efforts to create this course. I have been watching all videos thoroughly. I observed small thing that I thought I should correct at 13.15 you tried to change state directly which threw an error because we have used (const) for useState De-structuring. If you use (let) instead and try, you would be able to change state directly. (Though this is not correct way to update the state as you mentioned in video after that). Keep Going and Growing. 🙂

  • @owaisnadeem2751
    @owaisnadeem2751 6 місяців тому

    It's eid day 01 and the time is 02:30 PST and I am continuosuly watching and practicing your react js series to get the mastery in it , love and respect from Pakistan Harry Bhai

  • @softboxmelody
    @softboxmelody 2 роки тому +3

    I followed every steps and when I am clicking btn convert to uppercase it shows the value only for a second and site automatically reloads and text disappear

    • @prisinha
      @prisinha 2 роки тому +2

      event preventDefault

  • @Zeegi
    @Zeegi 16 днів тому

    Yess sirrr Maza aagaya
    Convert to upper case page banake
    The one that is made by myself 🎉🎉🎉🎉🎉

  • @itsmytechnology9285
    @itsmytechnology9285 3 роки тому +3

    First 🔥

  • @Svyamkrit29
    @Svyamkrit29 11 місяців тому

    It is going to add massive value into any coder's journey who's gonna watch this whole couse!

  • @rohn3711
    @rohn3711 2 роки тому +3

    Perfect explanation... Crystal clear 👍

  • @nimishajain3722
    @nimishajain3722 3 роки тому +2

    Thanks harry for uploading another video...🙏🙏❤❤❤

  • @ProgrammingNCodingWithHarsh
    @ProgrammingNCodingWithHarsh Рік тому +3

    code with harry come with sundeep maheshwarii

  • @closertothecosmos3519
    @closertothecosmos3519 3 роки тому

    Maza Agaya Harry Bhai. This is way better than your older 2hr React Course!!!!!!!!!!!!!

  • @mudassargujjar6442
    @mudassargujjar6442 5 місяців тому +1

    @CodeWithHarry bohat maza aa ryaaa boss

  • @shahzadshahzad475
    @shahzadshahzad475 Рік тому

    well done Harry sir,,,,,i am from pakistan ,,,,,Bhai ma ap ki saari video dekhta hu ,,,ma na ap sa bohat kuch seekha hai ,,,,Allah ap ko khush rakha ,
    and ap aur success achieve kra

  • @souvikmukherjee2349
    @souvikmukherjee2349 9 місяців тому

    I can't thank you enough Bhaiya... literally any word is insufficient to explain your efforts

  • @conceptresearch2002
    @conceptresearch2002 Рік тому

    13:30 error ka reason alag hi hai....simple...kyunki const variable pe value reassign nahin kiya ja sakta....wo baat nahin hai....
    agar variable ko "let" ke saath declare kiya jaye toh ye work karega...koyi error nahin aayega.

  • @MuhammadUsman-2001
    @MuhammadUsman-2001 4 місяці тому

    First time in life coding ka Maza aaraha ha amazing teaching ❤

  • @sachindrapandey7146
    @sachindrapandey7146 Рік тому

    Highly recomended for begineers who just started react,,very clear & crisp

  • @wisdomkhan
    @wisdomkhan 2 роки тому

    Bohot maza aa rha hai bhai. You are explaining things so subtly. You are awesome bhai.

  • @shikharagarwal6034
    @shikharagarwal6034 2 роки тому

    "Harry is really a good boy" It should be mark as a universal truth :) You are really awesome Harry bhaiya.

  • @haxiyi
    @haxiyi 3 роки тому

    9:56 sharyi
    sunte raho kahani ,
    apko samajh m ayegi baat,
    kyunki mene abhi khatam nhi kara hai,
    hooks kai bare m batana or state k bare m batana aaj ,,,,,,,,,,,,,,,,,,
    wah wah wahhhhhh

  • @StylinCollections
    @StylinCollections Рік тому

    this is Very helpful for people learning react for the first time ... Thanks Brother

  • @buisny
    @buisny 2 роки тому

    Legend 17yo me doing this in browser ide of window 7
    Window 10 ka paisa nhi hai lekin jajba toh hai harry bhaiya react node window 7 me bhi work kar sakta hai mai browser me ide chala ke apke videos se code karta hoo thanku bhaiya ji

  • @livelife3051
    @livelife3051 2 роки тому

    Harry Bhai this Reactjs Series is one of the beautiful and enjoyable coding series in my ever life..

  • @manthanramteke6101
    @manthanramteke6101 3 роки тому

    Thanks Harry bhai ❤️❤️❤️ you are God of Coding in the World 🌎🌎🌎🌍👍👍👍👍

  • @ashutosh6664
    @ashutosh6664 Місяць тому

    00:02 Understanding Props and Creating a New Component
    02:15 Creating a TextForm component with props and rendering it in a container
    04:37 Understanding State in React
    07:10 Understanding State & Handling Events in React
    09:54 Understanding useState and updating state in React
    12:42 Understanding how to set the value of a textarea and the correct way to change the state in React
    15:22 Handling events in React and updating state
    18:00 Understanding event handling and state in React
    20:26 Understanding State & Handling Events in React
    22:59 Understanding State & Handling Events in React

  • @jaankajhotta
    @jaankajhotta 2 роки тому +1

    Well done harry bhai mja aa gya aap se sekh ker

  • @rajgautam5122
    @rajgautam5122 3 роки тому +2

    This guy is awesome. He is a beast.

  • @Sachin_Ravi
    @Sachin_Ravi 3 роки тому

    maine 3 bar hooks pada hu lekin 4 time me samja vo bhi haary bhai ke video me nicee

  • @rushikeshbhujbal2480
    @rushikeshbhujbal2480 Рік тому +1

    YOU ARE AMAZINGG HARRY BHAI LOVE FROM ANTARTICA

  • @inventionforsolutionifs5643

    BHut Shi or Sandar couse hai bhaiya Thank you so much.😍😉😊
    ❤🥰🥰

  • @wasiquekhan4513
    @wasiquekhan4513 Рік тому

    Thanks bhai bohot pyar se sikhate hai aap aur look bhi smart hai ap ka and style and voice also

  • @tejaskumar4470
    @tejaskumar4470 3 роки тому +1

    HARRY BHAI 2 VIDEOS WOW!!!!! 🔥😊

  • @ADITYAMISHRA-kx4dy
    @ADITYAMISHRA-kx4dy Рік тому

    Love you Harry bhai bht aasan tarike se btaya ha aapne, mja aa gya❤❤

  • @Meshv_patel
    @Meshv_patel 3 роки тому +1

    Are harry bhai today is there two videos by you omgggg good very good

  • @shalini6010
    @shalini6010 2 роки тому +1

    This react tutorial is the ever best ❤️

  • @PrakashKumar-p1t1u
    @PrakashKumar-p1t1u 2 місяці тому

    thank you Harry , maja aagaya ReactJS se

  • @michaelhenry4667
    @michaelhenry4667 3 роки тому

    Bahoot majza aaa raha hai Harry sir
    Really respect you and love you.

  • @sonalibiswal6337
    @sonalibiswal6337 Рік тому +1

    Amazing video!

  • @yugal3556
    @yugal3556 2 роки тому

    I believe in you harry, and lakhs of us believe in you , you keep making videos , we keep learning from you and keep supporting you , thanks for awesome playlist

  • @ankitshah1655
    @ankitshah1655 2 роки тому

    Not only video .....Harry's Video is emotions.🤗

  • @pranto.cse25
    @pranto.cse25 Рік тому

    You Are Boss Bro. Love From Bangladesh ....❤❤❤

  • @generalgaming2237
    @generalgaming2237 Рік тому

    bhai dil se thanks hai apko aur apki itni mehnat ka

  • @Lovii_shorts
    @Lovii_shorts Рік тому

    very use full video this course is perfect for beginners in react 😍

  • @Aayush-cd3dc
    @Aayush-cd3dc 3 роки тому

    Are waah sir ap humare liye kitni mehnet krte ho thankss

  • @Zeegi
    @Zeegi 16 днів тому

    Harry is a good boy😂😂😂
    Funniest part sirr!!!!

  • @anmolraval2164
    @anmolraval2164 Рік тому

    Very AWWSOME Video Harry Dada !!!

  • @nagendrababu6316
    @nagendrababu6316 2 роки тому

    Thank you Harry, today I added two more Lowercase & Titlecase buttons using StackOverFlow and your class.

  • @ruchinfulani2149
    @ruchinfulani2149 3 роки тому

    fantastic video Harybhai because I have seen many videos related to state but I can't understand easily. After watching your video I understand usestate actual meaning.

  • @kushagradubey6395
    @kushagradubey6395 3 роки тому +1

    This React course is very very helpful.

  • @rahulgupta373
    @rahulgupta373 Рік тому +1

    I didn't got what is useState and how does it actually works,
    I guess you should make another video to make it clear;
    anyway i am loving this playlist, and definately learning alot
    thanks for making such a great study material, for free of cost ☺ ☺

  • @jayandhami7344
    @jayandhami7344 6 місяців тому

    This react course is very useful, love form Nepal harry bhai ❤

  • @lokeshrathi9684
    @lokeshrathi9684 2 роки тому

    great harry bhai maza aa rha hai sach mein.

  • @abhinavshukla5628
    @abhinavshukla5628 2 роки тому

    maza aa riya hai......dil garden garden ho riya hai :)

  • @srupoemwriting8287
    @srupoemwriting8287 3 місяці тому +1

    Thank you so much sir . I have a request sir can u please make a Angular playlist basics concept like this sir?

  • @ashikmehermobin9926
    @ashikmehermobin9926 2 роки тому

    The most easiest explanation of useState

  • @zohaibahmed523
    @zohaibahmed523 3 роки тому

    Harry bhai ap pro ho hum nh sab sir k upr say ja rha hai plzz aram say or achay say explain krdein , reactjs bilkul new hai mare liye

  • @harshpagada8504
    @harshpagada8504 Рік тому

    Harry I see your react video wow, your course is a amazing.

  • @ibrahimamjad1102
    @ibrahimamjad1102 3 роки тому

    very good harry bohat achi samajh arai ah

  • @deepakpottavatri7613
    @deepakpottavatri7613 11 місяців тому +1

    state explained from 7:04

  • @mukulbansal8269
    @mukulbansal8269 3 роки тому

    this react tutorial is the best in this world.

  • @techveerendra1689
    @techveerendra1689 Рік тому +1

    Sir time 23:00 par click to uppercase par click karne par new blank page open ho raha plaese help me

  • @shivanisingh-mc1xr
    @shivanisingh-mc1xr 3 роки тому +2

    I saw multiple tutorial on react, but really couldnt understand anything. But Thanks to you Harry for making things so simple. Heartful thank you for this.

  • @rkscp7711
    @rkscp7711 Рік тому

    🙌🙌you always gives us good inner happiness

  • @sawanmishra9117
    @sawanmishra9117 Рік тому

    harry bhai bahut mst padhatey ho yaar aap dil se thank u bhai

  • @techybusiness9688
    @techybusiness9688 3 роки тому

    This Couse Is Really helpful for me!!!🎊✨✨✨

  • @abdulafzal404
    @abdulafzal404 Рік тому

    khush raho brother and thanks alot for making these amazing videos

  • @alihasnain7739
    @alihasnain7739 2 роки тому

    Sir sir sir sir you are amazing wonderful charming kindful helpful humble inshort you are everything
    ......

  • @Code_Note
    @Code_Note 3 роки тому

    text.split(' ').filter(function(n) { return n != '' }).length this will work perfectly for no of words count
    @Harry bhaiya

  • @rahulkadam6655
    @rahulkadam6655 3 роки тому +1

    This react course is helpful!🔥