#36 : Handling Complex Multiple Input Form States in React JS in Hindi

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

КОМЕНТАРІ • 234

  • @ThapaTechnical
    @ThapaTechnical  4 роки тому +8

    video ko ek do bar jarror dekhe :) ➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: ua-cam.com/play/PLwGdqUZWnOp3aROg4wypcRhZqJG3ajZWJ.html

  • @steelado3433
    @steelado3433 Рік тому +13

    for those who didn't understood don't try to complicate things, this is really easy, don't try to binge watch rather try things at same time when Vinod teaching us pause the video and think what he said at every 3 to 5 minutes. at first I didn't really understood the concept but in 3rd time something clicked in my mind and I was laughing at my own for just making it more complicated. he used simple JS.

  • @anshudhar966
    @anshudhar966 3 роки тому +7

    Tumhare videos dekhkar mujhe web developer ki job mil gayi, thank you bro!!

  • @prasiddh283
    @prasiddh283 8 місяців тому +2

    Most underrated channel of UA-cam👏

  • @ashishkumarburnwal5750
    @ashishkumarburnwal5750 2 роки тому +6

    Using object destructuring will be useful in this case like-
    const [values, setValues] = useState({
    fname: "", lname: "", email: "",
    })
    const changeHandle = (event) => {
    setValues({
    ...values, [event.target.name]: event.target.value
    })
    }

    • @md.jubairahmed4097
      @md.jubairahmed4097 2 роки тому +1

      yeah, exactly. This is the simplest one

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

      Spread operator saves prev value mean how does it work.....is that like if we write for name input it will is save that in values and so on???? ......and why we write in array for keys???

  • @md.jubairahmed4097
    @md.jubairahmed4097 2 роки тому +4

    Even that code is also bulky, you could simply use setName(prev=>{...prev, [e.target.name]: e.target.value})

  • @sanketsuryawanshi
    @sanketsuryawanshi 4 роки тому +9

    Best UA-cam channel ever

  • @MrKapbat
    @MrKapbat 4 роки тому +52

    since you have taken same fname and lname at every function. This is very very confusing. This is the first video which confused me. And if we need to do all this simply to get value. Don't you think simple javascript infact jquery is much much better. I have a feeling that their must be another simplest way to get and store values of form.

    • @myselfsohit
      @myselfsohit 4 роки тому +1

      There are various way ...He is trying to make comfortable with react

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

      yeah it also confused me.. :/

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

      @@manishdiggi231 same goes with me

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

      same, this is maybe the first time i got bored of this tutorial.. might have to rewatch it 2/3 times to understand

  • @divyanshchaudhary7063
    @divyanshchaudhary7063 4 роки тому +32

    Bhai tune itna complicated kardeya ye topic

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

    after watching 10 times and try kia and Thanks to My ALLAH aur apka mjhy samjh aaa gya

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

    mene first barr video dekha to muje kuch samaj me nahi aaya ,but mene firse video dekha or sathme code karta raha tab pura video samaj me aagaya to thank you so much 😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎

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

    After watching 5 times I was able to understand awesome

  • @letsshowdesigns
    @letsshowdesigns 4 роки тому +15

    Thapa brother please also cover Redux topic in this series.

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

      Vindo sir,
      A humble request you to create videos for Redux.
      We want to know what is it, when and why to use it ?
      Thanks

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

      I also want to learn React with Redux...

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

      It is created🤞🤞

  • @ncmnk9484
    @ncmnk9484 3 роки тому +18

    This seems more complicated than previous login page

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

    In this series, this is yours first little bit complicated video but still fine 😄

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

    Sir you are awesome. You teach hard topics very easily. I appreciate all your hard work . sir your videos are always very helpful .Thank you.

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

    This html file is a template .
    If you open it directly in the browser you will see an empty page
    You can add webfonts Meta tag or analytics to this file

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

    Sir
    I didn't understand single thing from this tutorial
    Please make another video for Form validation in Reactjs

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

    i got the 1000 like and this video cleared all of my doubt

  • @aniketbhalla1521
    @aniketbhalla1521 3 роки тому +7

    Until the knowledge of this video, in the inputEvent function, we can also write the following:
    (e.target.name == 'fName') ? setFullName({ ...fullName, fname: e.target.value }) : setFullName({ ...fullName, lname: e.target.value });
    if we don't want to use previous state of the component. Rest what thapa sir has teached us is also very good and very simple to understand. Thanks sir.

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

      bro why cant we create a separate variable outside suppose (prevfirstname,prevlastname) and as soon as user enter something than in the change function we will do if
      ---------------------------------
      let prevfirstname,prevlastname;
      const change(){
      if(e.target.name==="fName")
      prevfirstname=e.target.value;
      else
      prevlastname=e.target.value;
      setName({fname:prevfirstname,lname:prevlastname});
      }
      -------------------------------------
      why this don't work?

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

      @@rohitrout6450 your function and if else syntax is wrong bro, syntax for function : const function = () ={}, syntax for if else : if(){}else{}

  • @asmereg
    @asmereg 4 роки тому +4

    Thank you, Bhai. You teach really great💜🔥

  • @Deepak-gj4ni
    @Deepak-gj4ni 3 роки тому

    Mast I was looking for a shorter way without creating multiple states moj krdi bhai

  • @incredibleindia4816
    @incredibleindia4816 4 роки тому +1

    You got 1 new subscriber sir..
    Bhot he informative videos hai vo bhi bhot simple tarike se. Or vo bhi 100% genuine..
    Mai bhot time se UA-cam use krra hu
    Bhot saari videos dekhi but vo kuch kaam ki nahi rehti.. unse agar kuch comment me questions pucho to reply tak nahi karte.
    But aaj maine apki videos dekhi.. God promise fan ho gya hu apka.. bhot accha kaam kar rahe ho keep it up we support you 🥰🥰🥰🥰🥰
    #thapaji really love you ..
    And thanks for this type of videos ..
    Sach kahu to mere paas word ni hai apki tarif ke liye..
    You are the best
    😋😍😍😍😍😍😍😍😍🤣🤣🤣🤣😍🤣🤣

  • @rajat-s-kale1771
    @rajat-s-kale1771 Рік тому

    Your teaching is awesome

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

    i like the way you teach but you made this topic very complicated and difficunt to understand!

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

    you are amazing. way of teching of u us fabulous.

  • @Muhammadwaseemkha9003
    @Muhammadwaseemkha9003 4 роки тому +10

    bht confuse hy pehly wala tareeqa thek hy

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

    Bhai kya Redux sikhaonge is series me?

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

    I watched this video 2 times but didn't get the concept. should I move to the next videos ?

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

    thank you bhaiya.. it"s really helpful ...please try to provide the source code along with the vdo.

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

    Thapa bhai you are great 👍
    Please make a coding app for Android like vs code editor please 🙏🙏
    Because you know everything 😇

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

    thapa bhai mauj krdi tumne to

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

    from where can i get the codes of this entire series of react ?

  • @DEEPANSHU_NAG
    @DEEPANSHU_NAG 4 роки тому +7

    Plz *_react_* se ek *_website_* create kre and backend programming *_Node JS_* me and database *_MongoDB_* use kre...

    • @ThapaTechnical
      @ThapaTechnical  4 роки тому +6

      Sure

    • @DEEPANSHU_NAG
      @DEEPANSHU_NAG 4 роки тому

      @Abhay Pratap NO

    • @DEEPANSHU_NAG
      @DEEPANSHU_NAG 4 роки тому

      @Abhay Pratap from internet agar aap ek do programming languages jante ho ya intermediate/master kiya h toh aap other programming language sheek sakte ho online books padkr and internet se reference lakr very easily sheek skte ho

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

      ​@Abhay Pratap hello bhai , have you learned react js and create project on it

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

    const handleChange = (e) => {
    setformData(prevFormData => {
    return{
    ...prevFormData,
    [e.target.name]: e.target.value
    }
    })
    }

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

    Loved the way you teach 👍

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

    ye video 2 times kyun add kiya playlist mein.
    39 and 40 are same videos.
    please remove 40th no video from playlist

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

      es bnday ka concept theek nhi abi previousValue to add kr rha lakin smja nhi rha k eska kam kya hai o bhai ye previous state hai jab app fname main value add ker rhay ho to basically fist state ki value update ho rhi to phr previous state ko kasay deal kr rhay ye to smjhao r video to fazool main itna long krtay ho

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

      @@rashidarani3674 watch on 1.25x speed
      Or 1.5x speed don't waste time

  • @ZahidKhan-th8pz
    @ZahidKhan-th8pz 3 роки тому

    Bahot complicated tha smjh jb aane laga to fir kuch aesa bata diya ki confused ho gye

  • @Tahirkhan-hv3jn
    @Tahirkhan-hv3jn 3 роки тому +2

    abi tk ke sare video smjh agye.but ye wali video hadd se zyada confusing hai

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

    Thapa Bhai how to limit number type input box length so that it will take only 2 digits not more than that? In ReactJs

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

    bhai source code ke naam pe tumne apne website ki link de rakhi hai
    to banda source code kaise dhundega

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

    watched video 4 tiimes... coded same...ERROR : TypeError: Cannot read properties of undefined (reading 'fname')
    Please anyone can help?

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

    I have inut field and i need to print the input value in table column when user press enter key. Plz sir send me tips to solve this problem

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

    its more complicated i expecting much better but itsmore difficult than prevoius one...

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

    watch this video 3 time and practice 1time and analize 2 time it will easy

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

    ( hmr waiting for update signal from wds...) i am getting this message on my console. Can you suggest me any solution?

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

    This video is very confusing 😵😵😵😵
    But l love your content

  • @parveen545
    @parveen545 4 роки тому

    Thapa bhai zoom to the starting me hi kar diya karo, mobile me easy rehta hai dekhna aura samjhna, thanks

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

    Thanks sir ji❤️🤗 Awesome

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

    bhai ye last se same kaise hai?last me button pe click pe ho rha tha aur ye aisa login form kha hota har jgh to click pe hi hota

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

    Actully your called fname and lname with defining is error shows when I write like you
    but when I write Fullname.fname and Fullname.lname it work and its also showing error on that attribute are undefined so what's the solution?

  • @vikashsinghrajput8407
    @vikashsinghrajput8407 4 роки тому

    आग है तू भाई

  • @myselfsohit
    @myselfsohit 4 роки тому

    #Enjoying a lot ...........

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

    Thank you so much for this video.

  • @sid.26
    @sid.26 Рік тому +1

    Error: Cannot read properties of undefined (reading 'fname')
    Please help

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

    sir what if we have to show data on submit button ?

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

    Sir, ye values heading me show karneki koi need nahi thi, isse bohot complicated ho gaya ye. Aur previous wala to 2-3 days se try kr raha hoo bt nahi samajh aya kuch.

  • @mumarishaq7200
    @mumarishaq7200 4 роки тому +7

    It is difficult plz make one more on it with details

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

    Please make tutorial on React native 🙏🙏🙏 hma sirf apki smjh ati

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

    Hi can we write the code without "value" attribute ?? is it necessary to use ???

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

      Value attribute is very important if you want to create login forms.

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

    Return karta time hamna { } walli bracket kyu use kii hai instead of ( ) this bracket
    Kya object banaya hai Fullname ka ishliya kiya hai ya koi aur reason sa kiya hai

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

      Please answer me

    • @anti-tankartur677
      @anti-tankartur677 9 місяців тому

      kyuki tum yaha object return kar rhe ho, aur defualt object is enclosed withing curly braces. Isiliye instead of defining an object and returning only the name of the object, thapa idhar directly object ko return kar rha. For simplicity, just imagine ki return ke bad khali ek variable ka naam hain, baki sab maat dekho tab samajh aa jayega.

  • @RahulGupta-wh7or
    @RahulGupta-wh7or 3 роки тому

    sir i am facing problem on this videpo i have written same code in my machine but it's give me an error please help me sir
    error is
    object is not valid as a react child
    found object keys {name,password,email} if you meant to render a olletion of children use aaray instead

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

      Rahul Gupta hello bro 1 year ho gya is comment ko . react js acche se sikh gye ya nahi plz reply

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

    Mix-Veg video, could've used a better naming convention!

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

    video num 39 & 40 from react playlist are the same.

  • @imshivamshakya_
    @imshivamshakya_ 4 роки тому

    Awesome 💓

  • @pavanrao2965
    @pavanrao2965 4 роки тому +1

    Good video

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

    first time complex laga muje 😅😅😅😅😅

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

    WATCH THIS VIDEO, ONE MORE TIME.
    EVERYTHING WILL BE FINE.

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

    Bhai last me input me value vala attribute uncomment kyu kiya, itne same name k variables hai..can anybody explain..@Thapa

  • @kaustavbasu8250
    @kaustavbasu8250 4 роки тому +1

    Very complicated sir.

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

    nice explanation

  • @abhisekmishra3523
    @abhisekmishra3523 4 роки тому +1

    This video is useful but i have a doubt..
    when i try this: if(name === "fname")
    {
    return {
    fname: event.target.value,
    lname: prevVal.lname,
    age: prevVal.age,
    gender: prevVal.gender
    }
    }
    and change the input field for second time it shows TypeError: Cannot read property 'value' of null but when i destructure the event name and value it works fine how ???

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

      may be it's becoz u r using event.target.value under the -if condition . if we use
      const value=event.target.value
      then it will assign(store) the value just 1 time .so the value ramain same under every 'if condition' . so store the event value (event.target.value) before working under if condition

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

    Thanks for the concept clearing video.
    Pls let me know how I can handle form based on radio buttons.
    Suppose I have two radio buttons n I have same form for both then how I will manage state n post data for each radio button info.

  • @reeshabhkapoor7
    @reeshabhkapoor7 4 роки тому +1

    I can't see hooks state in react developer tools...Anybody else facing the same problem?

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

    bhai select tag ko kese tag kare wo state in nahi aa raha hai

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

    thank you so much sir

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

    This is the first video which confused me

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

    vinod sir , please make playlist on react redux

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

    Please java in one video 🇮🇳🇮🇳🇮🇳

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

    Nice Explanation, but why are you using "const" keyword everywhere, we have "let" keyword also !!!!!!!!!!!!!!!!!!!!!!!!

  • @NeerajSingh-ch7wl
    @NeerajSingh-ch7wl 4 роки тому

    ok forms ka data ko store kaise karege backend pe....

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

    how your code automatically indented when you hit ctrl+s,

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

      use extension name : prettier

  • @SAADKHAN-qh3bp
    @SAADKHAN-qh3bp 3 роки тому

    multiple select option ki value kasy get karen gy?????????????????

  • @sufisufyan6489
    @sufisufyan6489 4 роки тому

    zabardast

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

    Sir ye prevalue.lname me error bata raha hai .
    Pls help.
    18:28 me.

    • @rahul-java-dev
      @rahul-java-dev 4 роки тому

      Same here bro.

    • @anupsrivashtava2676
      @anupsrivashtava2676 4 роки тому

      @@rahul-java-dev to fir apne correct kaise kiya .
      Wo code apka run kiya ya nahi agar kiya to kaise .
      Pls tell.

    • @rahul-java-dev
      @rahul-java-dev 4 роки тому

      @@anupsrivashtava2676 Sorry yaar...hmse bhi nhi hua.. bs code complete kr diye.

    • @anupsrivashtava2676
      @anupsrivashtava2676 4 роки тому +1

      @@rahul-java-dev agar ho to pls batana .
      Try karna to .

    • @rahul-java-dev
      @rahul-java-dev 4 роки тому +2

      @@anupsrivashtava2676
      if(name === "fName") {
      return{
      fname : value,
      lname : preValue.lname,
      email : preValue.email,
      phone : preValue.phone,
      };
      }
      Note : return ke baad curly braces usi line me hone chahiye.
      if(name === "fName") {
      return
      {
      fname : value,
      lname : preValue.lname,
      email : preValue.email,
      phone : preValue.phone,
      };
      }
      Ye galat hai. Unreachable code ka error aa rha tha is'se n.

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

    Bro can you display this data in a table?

  • @NeerajSingh-ch7wl
    @NeerajSingh-ch7wl 4 роки тому

    please make a video on sidebar with hamburger menu...

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

    When I type inside input field it disappears

  • @bhakuninavneet3906
    @bhakuninavneet3906 4 роки тому

    Thanks sir

  • @anupsrivashtava2676
    @anupsrivashtava2676 4 роки тому

    Sir apne fat arrow function banaya fir hata kar curly braces use kiya ye thora confusing hai .
    Help any one.

    • @rahul-java-dev
      @rahul-java-dev 4 роки тому

      Sayd wha glti ho rhi thi, islye video edit kiya gya and next time unhone ek object bnaya.

    • @anupsrivashtava2676
      @anupsrivashtava2676 4 роки тому +1

      @@rahul-java-dev may usi ke karan galti ho raha ho

  • @chandrapalyadav6863
    @chandrapalyadav6863 4 роки тому

    Thanks..broo

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

    In my browser it's showing like below

  • @webcode6071
    @webcode6071 4 роки тому

    U r awesome

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

    Repeated many times par kuch smjh ni aya

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

    Throwing error when I type last name-- cannot read property fname of undefined

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

    Kya baat hai

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq 4 роки тому

    source code ko sperate rakha rako plz , milta nahi hai

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

    dronacharya Award kb mil rha hai apko

  • @user-un3lj7iu7v
    @user-un3lj7iu7v 3 роки тому

    Getting error objects are not as a react child fname and lastname inside useState function

    • @user-un3lj7iu7v
      @user-un3lj7iu7v 3 роки тому

      Reply please

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

      Check your return there you would be returning object rather than its value eg: fullname.fame not fullname

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

    Hi Mr Thapa,
    I am getting an error when using
    const [fullName,setfullName] = useState({
    fname:"",
    lname:""
    });
    Objects are not valid as a React child (found: object with keys {fname, lname}). If you meant to render a collection of children, use an array instead.
    Please help

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

      May be you are declaring state inside return function

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

      May be change you extension js to jsx