React Click Events | Learn ReactJS

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 38

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

    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: ua-cam.com/video/EfAl9bwzVZk/v-deo.html

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

    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 11 місяців тому

    Love these videos ❤

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

    Awesome!!

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

    Super explanation

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

    awesome as always :-)

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

    Thank u. i ended it!

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

    Thanks 🙏🏻

  • @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! 💯🙏

  • @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: ua-cam.com/video/UVRDq-wnfgk/v-deo.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 2 роки тому

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

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

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

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

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

    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 2 роки тому

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

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

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

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

      Is the parameter. Sorry sir for my ignorance.

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

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

    More React :)

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

    Top

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

    dammn i love u

  • @oujjahamza3033
    @oujjahamza3033 2 місяці тому

    🗾🗾🗾🗾🥭🥭🍎🍊