Full React Tutorial #27 - Controlled Inputs (forms)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024
  • Hey gang, in this React tutorial we'll see how to use input fields & track what a user types into them, using controlled inputs.
    🐱‍💻 🐱‍💻 Course Files:
    + github.com/iam...
    🐱‍👤🐱‍👤 JOIN THE GANG -
    / @netninja
    🐱‍💻 🐱‍💻 My Udemy Courses:
    + Modern JavaScript - www.thenetninj...
    + Vue JS & Firebase - www.thenetninj...
    + D3.js & Firebase - www.thenetninj...
    🐱‍💻 🐱‍💻 Helpful Links:
    + HTML & CSS Course - • HTML & CSS Crash Cours...
    + Modern JavaScript course - • Modern JavaScript Tuto...
    + Get VS Code - code.visualstu...
    🐱‍💻 🐱‍💻 Social Links:
    Facebook - / thenetninjauk
    Twitter - / thenetninjauk
    Instagram - / thenetninja

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

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

    The fact that this react course is completely free is insane, Your way of teaching is really clear and easy to understand. Keep it up my man you are god given.

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

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

    Off-topic, but can you show your desk setup?

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

    recap
    this episode talks about two-way data binding ( a very important concept in reactjs, usually used in form element )
    1. assign a dynamic value to 'value' attribute of input/textarea/select element.
    example
    const [name, setName] = useState('mario')
    2. listen 'change' event with a handler (anonomous function) to set value, for example
    setValue(e.target.name)}>
    thats it !!!

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

      I'm reading your recap in every video. That's really useful !!

    • @jackw.3978
      @jackw.3978 2 ปีที่แล้ว +2

      @@yashrdoshi I still don't understand why exactly the value of the input needs to be set to the the dynamic value. And why it is letting him change the text in the input after he implements the onChange event. Would like to understand what happens in the background...

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

      @@jackw.3978 Great question Jack! The onChange attribute fires everytime the value of the input is changed. And since the onChange event is grabbing a reference of the value attribute's value to set a state variable, we must set the value attribute to a 'dynamic value'. I hope this helps.

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

      What I don't understand is why do we need to assign the value of an input since we don't use this in anything. When we need the value of that input, we use the state to process it(maybe pass it in the backend or something), not get the actual value reference from the actual element.

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

    Thank you so much, having such quality content for free is mindblowing

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

    If you want to use default text in your input, then have it clear on click, here is an example of how to do it;
    // input state
    const [title, setTitle] = useState('Default Text'); // add initial title state value here
    setTitle(e.target.value)}
    onClick={(e) => setTitle('')} // clear input on click
    />
    Also, thanks for your great work Net Ninja, I have subbed now, as that's the least I can do for your great tutorials.

    • @shahiqqureshi7652
      @shahiqqureshi7652 7 หลายเดือนก่อน

      Good suggestion, personally I think it might be better to use the placeholder attribute, because if someone goes back to edit that field it will reset.

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

    Honestly you just might get me at job next week. I've got a test coming up this Thursday and this series is just *chef's kiss*. Thank you SO much. I'll be sure to send some money in your direction if it goes well. There is so much content on TH-cam but none that fits my current level better than yours. It is wonderful to know that your content is up-to-date, uses best practices, and is of great production value. The Github repo is also super nice to have. 💪

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

      Good luck

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

      Got the job! Gonna sign up for the Udemy course.😎

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

      @@TheRahulDBZ Thank you. Pretty stoked about it. 🚀

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

      @@michaelandersen8570 any important tips you can give to someone like me who's looking to apply for jobs?

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

      @@mistersir3185 I can only speak for myself, and to be honest a lot of it has to do with pure luck. Best tip I can give is to code as much as you can and put it on Github. Make your own stuff and take inspiration from tutorials in the beginning - but avoid pure copying. When you have built a few small projects you'll have confidence in yourself and it will reflect in the way you write about yourself in your resume. I think recruiters pick up on this. And it will also help tremendously at an interview.

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

    This got to be the simplest explanation I've encountered.
    Awesome video..
    Thanks for sharing 👍

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

      Thanks for watching Peter :)

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

    Straight to the point. Thanks a lot!

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

    I'm proud of net ninja

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

      yaa me too...he is amazing at his work

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

    even though i watched your videos before and coded with you. this coming back to them shows me more detail. thank you

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

    have I told you lately that I love you? :D You just took something that was confusing me and simplified it so well. Your free content led me to buy one of your udemy courses and I plan to buy a few more because you explain things in a way that just clicks for me. Thank you Shaun, truly...

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

      That is awesome to hear Mels :) your support is much appreciated!

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

    Great tutorial of controlled inputs! I cannot thank you more!

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

      Thanks Wenlong!

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

    awesome mentor. I am sure he is really expert in this field .

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

    A complex topic made simple. Very nice video!

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

    thank you it helped me quickly understand how it works after I had an implementation question in an interview that didn't go so well

  • @heroinedecheshire7065
    @heroinedecheshire7065 9 หลายเดือนก่อน

    You're amazing! I always thought forms are a pain in React but you cleared them up for me! These videos are amazing and this is what passion looks like!

    • @NetNinja
      @NetNinja  9 หลายเดือนก่อน +1

      That's brilliant to know :) glad it helped!

    • @terrencejanairo2675
      @terrencejanairo2675 9 หลายเดือนก่อน

      @@NetNinja do you have router v6 in this project?

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

    Thank you - loving this series so far! One comment - for accessibility, you should keep the htmlFor attribute in the label and use the input id attribute, so they are connected.

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

      Yes! Literally was just about to say this!!!

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

    Not one to comment usually but this might just be the best explanation I've seen. Top quality content!

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

    3:07 thats was the best uh uh i heard in my life

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

    Net Ninja, You are a Legend!!!! Best of the Best

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

    As always many thanks for teaching all these

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

    Short and precise , I LOVE IT. 😍😍😍😍

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

    this is some quality stuff bro, thanks for putting it on youtube for free 🤩

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

    You have no idea how much I love your videos and how much they have helped me. Thank you for your service.

  • @Human_Evolution-
    @Human_Evolution- 3 ปีที่แล้ว

    The best vieo on this subject. I spent 45 min looking until I found you. All others are inferior.

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

    remember when this looked foreign fells nice being able to read through so fluently humans are amazing

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

    thanks! this video just helped me !

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

      Awesome! thanks for watching Rafael :)

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

    Extremely helpful. Thank you very much

  • @pulledporksammiches
    @pulledporksammiches ปีที่แล้ว +16

    I would hit the like button every time i watch this if I could. Great way of explaining React my dude. It's been hard for me to understand React, but in the last several months, I've been determined to get really good. I've watched this video like 5 times already easily. And every time I do, I can confirm that it has sunk in way more every time.

    • @NetNinja
      @NetNinja  ปีที่แล้ว +5

      That's fantastic to hear Susan, sometimes it takes a while to cement in, but once it does, hopefully it sticks :) I find that application and giving yourself little challenges help aid this even more so! (learn by doing).

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

    I don't know why I laugh with the yohoo! 😂

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

    great video man

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

    Hi ninja. Thx for all the playlist again. But i have a question in particular this session. U wrote repetitive code in this file to handle state but u could eliminate code via using a form state object. Why didnt u that? Is because of u dont want trigger updating whole object on all types? Is this for upgrading performance?

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

    Form Styles:
    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

  • @0x0abb
    @0x0abb 2 ปีที่แล้ว

    awesome work - once again

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

    3:08 i really like that woohoo sound at 2x

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

    Realy helpful series!!!

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

      Thanks Jakub

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

    3:05 Wohoo!! I love this small funny things 😍

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

    Instead of using routing from react we can use fetching from backend ?

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

    Thank You Brooo

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

    TY Mate

  • @elyeskabous2343
    @elyeskabous2343 11 หลายเดือนก่อน

    Thank you so much

    • @NetNinja
      @NetNinja  11 หลายเดือนก่อน

      No problem :) hope it was helpful

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

    Please cover all scenario like check box radio button and check tree view and complex form validation and getting response ,api crud operation

  • @Atrainn234
    @Atrainn234 5 หลายเดือนก่อน

    Is it possible to set the state for all your inputs at once with the onchange function 🤔?

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

    For some reason my button add blogs isn't in the center, its aligned with the left side of the boxes

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

    const [title, setTitle] = useState('')
    const [body, setBody] = useState('')
    const [author, setAuthor] = useState('mario')

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

    This is so Good man 😁😁😁

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

    It's really awesome having this tutorial for free. Thank you very much. However, I'd like to know if it's possible to use json server for authentication, or if you have any tutorial on user form validation and authentication with json. Thank you

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

    why are there no tutorials on class components? ANYWHERE on the internet?

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

    is it wrong to just trigger a onclick when submit button is clicked and just fetch value of all fields. This way we can escape all that react js extra redundant code.

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

    Thanks!

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

      Thanks for the support Nathan :) it's much appreciated

  • @СашоИванов-л3ц
    @СашоИванов-л3ц 10 หลายเดือนก่อน

    When i start type in the input i lost focus like input rerender and can type only once? Why is that?

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

    Is it necessary to set the input value to the dynamic title/author state? It doesn't appear to do anything.

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

    Hey M
    y prof i wish you're good and having a nice day please i have a question is this the full Tut of REACT i mean is will be more videos about REACT in this is playList

  • @Eslam-ig2gf
    @Eslam-ig2gf ปีที่แล้ว

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

    Hello Shaun,
    Can you please tell me, what extension you used for the javascript syntax theme? For example yellow for the variable/method declarations and purple for the return method, etc? Thank you in advance,
    PS. Your tutorials are the best on the internet. Cheers :)

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

    Great tutorial!
    Thanks Ninja
    How can I use the public folder?

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

      It is just laying around there but it is handy when you have images and other static stuff that will be okay to be open to see by the public. src and other folders are kinda private or you could say the stuff that only you could see means the source code and one more thing I want to tell you that you should learn next.js too as it would be more good and robust combination with react. And you can learn more about next.js in this video th-cam.com/video/Sklc_fQBmcs/w-d-xo.html&t. I hope I helped you , have a nice day

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

    Do we need state management system such as redux for modern reactjs apps?

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

    If the state variable is const, how can it be updated?
    I tried looking at the React docs for the useState hook but they didn't comment on this. I am just starting out with JS & React, so not sure if I was looking at the right places for the answer. It would be nice to know your comments on this, Shaun.

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

      state is not variable, we are destructing an array when we say const [x, y] = useState(""). and this is the regular behavior of const. const is storing reference to the array which can not be changed/reassigned. but we are not changing/reassigning the array here. We are just changing one of the values/variables stored in the said array, in this case, the value of x. Hope this helps. also if you want to study further just search on youtube for something like "difference between const, var, and let in javascript"

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

      If you look at this video (th-cam.com/video/dzEieWaOJE0/w-d-xo.html) at about 4:14 it explains this fairly well. As Ali stated in his comment, this is an Array, and an Array (with Const) can be updated. The video doesn't talk about React, but about Const and when/if it can be updated.

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

    so whenever any input field change happens whole form will be re rendered right? How to avoid that?

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

    long live brother

  • @yman_kh
    @yman_kh 7 หลายเดือนก่อน

    I do not get what is the point of using value={title} in the input form!!!

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

    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

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

    which plugin do you use to get the html autocomplete?

  • @sinnie.62.
    @sinnie.62. 4 หลายเดือนก่อน

    It seems i am the only one who is not able to fetch data when clicking on the blog
    I even copy pasted from repo cause i was not able to find my mistake can some one help

  • @01dicktracy
    @01dicktracy 2 ปีที่แล้ว

    I did not know I can understand everything so easy. Thank you so much Shaun!

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

    You are Great

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

    pls where is the next tutorial and does it only stop at 27?

  • @TheForestofNoobs
    @TheForestofNoobs 7 หลายเดือนก่อน

    "whooohouuu" :D

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

    I was a littile bit confused, because i haven't known that select has "value" property

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

    why dont you create a course for react along with nextjs in udemy

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

    Why do we need value then if we have state that gets the value onChange?

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

      That is because when you make UseState(initialValue) in form you see initial Value in that field.

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

    wooohooo

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

    I'm coming from vuejs and v-model seems way simpler than this lol

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

    great man always like your content.
    make a playlist on php latest one

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

    3:08 ooh wwwoh

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

    3:08 😄

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

    Why do we track what user types?

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

      We don't "track", we update it to the state variable

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

    Thanks Shaun🖤. But I think those react concepts very very basic which you told about it, I don't understand what is the main difference those two tutorials. Please prepare modern Redux tutorial that cover of the all topics in the documentation

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

    3:08 fun Wo wo

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

    I have an idiot question but i need to understand? We use Hook to replace props and State in Class Component right? please explain for me, because i don't see Shaun talk about props and state?

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

      Hooks are another option that can be used to manage state as well as for other things. You can use the useState hook in a functional component for that component to have state, instead of relying on a class-based component for state. Props are not replaced at all by hooks, they are still very relevant and needed to pass data from one component into another. I covered props earlier in the course (lesson 11, 12, 13) :)

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

      @@NetNinja it means, we don't need create state when using hook like create state in class component, right ? so anyway, thank you a lots for replying me

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

      @@hoanglongpham5907 Hooks are used with functional components because functional components dont have state like class components do BUT by using hooks we can add state to our functional components.

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

    minute 3 very funny 🤣🤣🤣

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

    i am the 5000th liker😁

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

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

    Woohoo !!! 3:08

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

    woohoo

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

    3:10

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

    I like British 😀

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

    This is horrible. You have to do onChange every time you have a form. Why would anyone use react if it is this way?

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

      It's not best tech but this is for learning purposes to grasp more idea about two directional binding. Here this style is used for demonstration purposes for this type of topic

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

      @@marcisabele8057 so what's the proper way to do?

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

    I watched this series yesterday and I catch up with it today! Shaun is definitely a life saver! I bought some React course in Udemy and I just can't stand the instructor's speaking tone, and I am easily distracted by hearing this, but I love shaun's teaching style!

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

      I have done the same, following courses from Udemy, but never fully grasping REACT as I also had issues with the tutors way of explaining too, until that is I found Net Ninja, he is a Legend!!!!

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

      But where to go from here after finishing this series?

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

    Thanks!

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

      Thanks for the support Julian! :)

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

  • @ruin9
    @ruin9 7 หลายเดือนก่อน +1

    I really love this accent ,keeps the video interesting

    • @NetNinja
      @NetNinja  7 หลายเดือนก่อน +1

      Thank you! 😃 I made it myself

  • @mohamedchine-ky6yk
    @mohamedchine-ky6yk 4 หลายเดือนก่อน

    hey great video , btw is it bad if we get the value of the inputs directly with getelementbyid and we delete all the usestates
    like for example instead of this :
    [x,setx]=usestate("")
    {setx(e.target.value)}} />
    we do this :
    x=document.getelementbyid(x);
    because tbh i dunno what's the use of the usestates with the form

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

    Maybe a dumb question, but why do you need the code on line 14 (value = {title})? The person typing inside the text field is already changing its value right? Correct me if I am wrong, but I believe that this code would be useful in situations when the {title} is changed (using the setTitle, of course) by some external event (not necessary for this specific blog page example of yours), e.g., a case where we could allow the user to come back to an unfinished blog entry and the title input field would then be populated with the contents of an earlier-entered {title} variable. Is that the right way of seeing this? thanks

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

  • @jAMES-xy6wh
    @jAMES-xy6wh 2 ปีที่แล้ว +1

    I came here to learn about React Router, and I found a goldmine of information. What a fabulous course!! And it is Free? How do I compensate you for your labor?

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

    /* create new blog form */
    .create {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    }
    .create label {
    text-align: left;
    display: block;
    }
    .create h2 {
    font-size: 20px;
    color: #f1356d;
    margin-bottom: 30px;
    }
    .create input, .create textarea, .create select {
    width: 100%;
    padding: 6px 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    display: block;
    }
    .create button {
    background: #f1356d;
    color: #fff;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    }

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

    Hello there, just wanted to know when this playlist will be completed?
    Awesome work BTW!