Learn React Click Events 👆

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • 00:00:00 intro
    00:00:15 Button component
    00:01:17 onClick attribute
    00:02:18 onClick with parameters
    00:03:49 onClick + conditions
    00:05:50 events
    00:08:02 onDoubleClick
    00:08:28 ProfilePicture component
    00:11:06 Hide an image on click
    00:11:58 conclusion

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

  • @BroCodez
    @BroCodez  8 หลายเดือนก่อน +7

    function Button(){
    const handleClick = (e) => e.target.textContent = "OUCH! 🤕";
    return( handleClick(e)}>Click me 😀);
    }
    export default Button
    function ProfilePicture(){
    const imageUrl = './src/assets/profile.jpg';
    const handleClick = (e) => e.target.style.display = "none";
    return( handleClick(e)} src={imageUrl}>);
    }
    export default ProfilePicture
    import Button from './Button.jsx'
    import ProfilePicture from './ProfilePicture.jsx'
    function App() {
    return(


    );
    }
    export default App

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

      Do react native videos as well

  • @mohammadbakeer4247
    @mohammadbakeer4247 8 หลายเดือนก่อน +4

    I am learning react this month and ur videos make it very easy to understand. I am currently trying to become a pro at use state

  • @nemesisxl6736
    @nemesisxl6736 8 หลายเดือนก่อน +5

    THANK YOU SO MUCH FOR THE REACT CONTENT! 😊

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

    Hey Bro Code love your videos, brother! 🙌 Hoping to see more awesome content on React. Keep up the great work! 👍

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

    Best teacher on the planet. since I started coding no one teaches me better fr

  • @tonytodd7011
    @tonytodd7011 8 หลายเดือนก่อน +1

    Thank you Bro, this lesson is great! Could you please continue making React.js lessons?

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

    Ty for your effort and time. More react content and maybe with ts or helping how to migrate to ts would be beneficial.

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

    Very effective lesson

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

    Thanks,mate❤

  • @IAmIshanSaxena
    @IAmIshanSaxena 5 หลายเดือนก่อน +4

    Bro stop clicking me. 🤣
    Sounds exciting

  • @kl-nj4qo
    @kl-nj4qo 8 หลายเดือนก่อน +1

    Thank bro .

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

    thanks you so much

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

    Thanks ❤

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

    thank You

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

    Nice tutorial. Just a note {handleClick} === {(e) => handleClick(e)} there is no need to wrap the callback in this case.

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

    Hi my bro, could you please upload more videos on react I love your way of explaining and I have exam ln it soon

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

    Noice ❤

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

    Hellou brou🙌 i am stevan from indonesia, i am sorry for stoped stream Earlier 🙏🏻

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

    Finally dude

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

    Is there a reason why you decided to start your file path to your image with "src" instead of just going directly to the folder ./assets/profile.jpg ?

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

      because it is straight forward. Even if you put ProfilePIcture.jsx file somewhere else, you won't have to change the path.
      Also, the path might be '/src/assests/profile.jpg' with the dot (.) at the beginning.
      Sidenotes: If you are moving files within VS Code, it does automatically change the path for you though.

  • @jonathanborics4793
    @jonathanborics4793 6 หลายเดือนก่อน +1

    how to add emoji in react?

  • @user-mk2md9pu5m
    @user-mk2md9pu5m 8 หลายเดือนก่อน

    Django course please

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

    Bro can u plz make a playlist for linux shell script

  • @user-cm5ol4ru8l
    @user-cm5ol4ru8l 8 หลายเดือนก่อน +1

    I cannot load background image in css in vs code .it is showing error help me

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

      Put it in the public directory and access it as "/image-name"

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

      what error could you elaborate?

  • @benhur221
    @benhur221 8 หลายเดือนก่อน +2

    What's the emoji extension?

    • @hunin27
      @hunin27 8 หลายเดือนก่อน +1

      windows key + .

    • @BroCodez
      @BroCodez  8 หลายเดือนก่อน +2

      Win + ;

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

    perfect after gym while eating motherfucking eggs