React Click Events | Learn ReactJS

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

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

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

    React is a Javascript library, and just like Vanilla JS, React can respond to many events. The most common of these events is probably the click event. This tutorial will give examples of the various ways implement and respond to click events in React. Just getting started with Javascript? If so, I suggest starting with my full 8 hour Javascript tutorial for beginners here: th-cam.com/video/EfAl9bwzVZk/w-d-xo.html

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

    you worth millions of subscribes, thank you

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

    An awesome explanation of events and references.

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

    Thank you so much Dear Sir for this series ♥️ . Please make this series to advance level

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

      You're welcome! Yes, starting at the beginning and working my way up! 🚀

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

      @@DaveGrayTeachesCode♥️♥️ 😊♥️♥️

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

      @@DaveGrayTeachesCode Don't forget to include Redux!

  • @1conscience0dimension
    @1conscience0dimension ปีที่แล้ว

    How did you read in my mind ? Exactly this question at the end :)

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

    Love these videos ❤

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

    Hi Dave. Do you handle in one of your videos, switching from Event bubbling to capturing in React? I would like to intercept an event from above. Question Two: Do u have a Patreon account :) ?

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

      I don't have one for event bubbling & capturing in React, but I do have one for JavaScript - and React is a JS library: th-cam.com/video/UVRDq-wnfgk/w-d-xo.html And thanks for asking about Patreon! I'm just starting one but it is not ready yet. I do have a BuyMeACoffee page: www.buymeacoffee.com/davegray

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

    very useful. Is it a full course by react js?

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

      Yes, this video is part of a playlist that is a full course.

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

    Awesome!!

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

    Why does onClick={handleClick} omit the parentheses? If I include them, onClick={handleClick()}, it seems to execute the function immediately and only once on render.
    *Nvm, you answered it later in the video. Great lesson as always, thanks!*

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

      Thanks for the comment and glad you found your answer! 💯🙏

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

    Super explanation

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

    Thank u. i ended it!

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

    Not sure how react handles button click event but I always tend to add type="button" attribute to my buttons even if they are not inside a form element (just a habit),
    I know this is applicable for buttons inside a form only but it caused some troubles in the past to figure out why my page was reloading while I'm using xhr, after that I found that the default type for a button element is "submit" 🤦‍♂️
    Nice video and looking forward to the next one,

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

      That is an interesting consideration! Thank you for the comment Ahmad 🙏💯

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

      @@DaveGrayTeachesCode Studying the tool before start using saves time,
      All thanks back to you Dave!

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

    Thanks 🙏🏻

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

    awesome as always :-)

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

    More React :)

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

    Just as Jerry I also have a problem with the code, and I've been double checking it for typos. I don't get the $name function to work - (name) get's 'greyed out' and the console just show ${name} was clicked. The next thing is that I don't get the double click to work - I've tried a number of ways to get it to work. But I'm stuck. Any one that can help me out?

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

      I solved the first problem with $name - but I can't get the doubleClick to work

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

    Top

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

    I have been having an issue... Onclick works.. But on doubleclick doesn't despite using the same logic as you... Getting frustrated here

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

    How did he know that {name} is dave ? 4:50

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

      Is the parameter. Sorry sir for my ignorance.

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

    dammn i love u