ReactJS Tutorial - 13 - Event Handling

ReactJS Tutorial - 13 - Event Handling

Codevolution

5 лет назад

647,277 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@bhavukmathur2709
@bhavukmathur2709 - 19.11.2023 10:29

@Codevolution, Thanks ! One question, why I don't see multiple logs when I click the button multiple times? I just see a counter next to the file name getting incremented on clicks.

Ответить
@lathagm666
@lathagm666 - 24.10.2023 19:45

completed video 13. Thank you 🙂

Ответить
@AxxionMarketPlace-iu6ri
@AxxionMarketPlace-iu6ri - 17.07.2023 00:38

Thank you

Ответить
@coadingwithpandeyji4642
@coadingwithpandeyji4642 - 29.03.2023 14:09

Can anyone tell me is class components are necessary when we are good with functional

Ответить
@walideker2253
@walideker2253 - 19.03.2023 19:13

ntaaa chiikourrrrr
tysm

Ответить
@AkhilaChilukuri-hq9ps
@AkhilaChilukuri-hq9ps - 26.02.2023 14:31

can we write the handler in onClick as arrow function notation like in the previous video of state

Ответить
@waelslogga2744
@waelslogga2744 - 02.02.2023 19:05

why we did'nt use arrow function to create handlers? any help?

Ответить
@aeliazafaasheira3238
@aeliazafaasheira3238 - 23.01.2023 05:07

what is the different if i remove export or not removing export inside class component? I still dont get it :(

Ответить
@LearnWithNoor036
@LearnWithNoor036 - 18.01.2023 09:44

in functioncClick :
function clickHandler() {
console.log("button clicked");
}
In classClick :
handleClick() {
console.log("inside class click");
}

What is the difference between these two ?
can anyone explain it ?

Ответить
@miss13688
@miss13688 - 19.12.2022 11:41

I really like the series so far.
I am having a bit of confusion earlier in onClick(eg. Counter.js) we were passing an arrow function to call the handler but here we are just calling it by name. How do we differentiate when to use what.?

Ответить
@programmingforfun4158
@programmingforfun4158 - 22.09.2022 19:18

The best guy for react for sure.

Ответить
@muneeswarreddy1129
@muneeswarreddy1129 - 22.07.2022 14:15

your teaching is Awesome Man, I Really love this Tutorial

Ответить
@AhamedKabeer-wn1jb
@AhamedKabeer-wn1jb - 14.07.2022 08:38

Thank you..

Ответить
@addybeez3277
@addybeez3277 - 24.06.2022 09:56

I dont know its an update in React i guess but we can't name FunctionClick for file now;...

Ответить
@vigneshgunasekaran2545
@vigneshgunasekaran2545 - 15.06.2022 01:07

Can create a function inside another function
in functional/class component : onclick="myFunction()" vs onClick={myFunction}
if added parantesis at end - {myFunction()} - it becomes function call - and method gets called, even before calling..... WoW...... also if its arrow function, ( ) is allowed, next video
if its class: onClick={this.myFunction}

Ответить
@kmgurumurthaiah1196
@kmgurumurthaiah1196 - 17.05.2022 14:01

please make a video Manually translate React js please

Ответить
@SurajKumar-bw9oi
@SurajKumar-bw9oi - 10.05.2022 12:42

Do any of you guys know emmet or other shortcut for writing console.log("") in VisualStudio Code?

Ответить
@augischadiegils.5109
@augischadiegils.5109 - 08.03.2022 14:52

♥️♥️♥️♥️

Ответить
@vaibsify
@vaibsify - 13.01.2022 15:59

awesome explanation 🙏

Ответить
@navjotsingh2457
@navjotsingh2457 - 10.01.2022 00:16

ty

Ответить
@tiagomelo3197
@tiagomelo3197 - 29.11.2021 16:19

I'm very new at this, I'm working on learning React Native, and I can't seem to wrap my head around how the hell i should work with events outside my file. I'm currently working on an exercise that asks me to create all my components separately. I have created a file (Input.js) where i have a password input that has a function where I can access the input text the user is texting, but i can't access the event, and the event changes on my Button.js file, anyone able to help???? I'm so stuck on this one, i'd like to avoid using redux or external libraries because i've been told it's possible in this scenario! PLEASE SAVE ME FROM THIS MISERYY!!

Ответить
@nithin9183
@nithin9183 - 29.11.2021 08:20

Why should we not use braces in event handling and why should we use braces in method

Ответить
@MounikajallipalliRG
@MounikajallipalliRG - 10.11.2021 20:59

I had a doubt why we used function keyword for clickHandler in fuctional component and y not used function keyword in class component

Ответить
@jeffmuteru8583
@jeffmuteru8583 - 03.11.2021 23:54

What if you do a function call inside an anonymous function?
<button onClick = { ()=> clickHandler() }>Click</button>

Ответить
@giovannimesquita
@giovannimesquita - 10.10.2021 12:26

The best React JS tutorial ever!

Ответить
@madhuvarun2790
@madhuvarun2790 - 09.10.2021 15:44

Hi, I have a doubt. Please see the below code.

import React, {Component} from 'react';

class Counter extends Component{
constructor(props) {
super(props)
this.state = {
counter: 0
}

}

incrementCounter(){
this.setState({
counter: this.state.counter + 1
}, () => console.log("count increased to ", this.state.counter))
}

render() {
return <div className="testing">
<h3>Count - {this.state.counter}</h3>
<button onClick={() => this.incrementCounter()}>Increment</button>
</div>
}
}

export default Counter;


When I run the above program, count increases by 1 when I click the button. But according to the tutorial when I remove parantheses to the incrementCounter the counter doesn't increase. Can anyone explain when?

Ответить
@tubepankajyou
@tubepankajyou - 29.08.2021 17:12

Perfect tutorial. Thank you Vishvas 👍

Ответить
@Aditya.Santra
@Aditya.Santra - 28.08.2021 17:32

Very Helpful Video ❤️

Ответить
@Human_Evolution-
@Human_Evolution- - 25.08.2021 20:42

Class and Functional Components. Perfect. Wish everyone would do that. Also, upload in 1080p.

Ответить
@poojaborhade7690
@poojaborhade7690 - 16.08.2021 15:13

Very helpful series on react.... thankyou sir

Ответить
@aryantripathi8275
@aryantripathi8275 - 16.08.2021 15:03

those code snippets are not working

Ответить
@vinayajmd
@vinayajmd - 31.07.2021 23:19

I'm a beginner in React and I couldn't have asked for a better start

Ответить
@dontbetoxic4387
@dontbetoxic4387 - 17.07.2021 20:52

thank you sir

Ответить
@sheerasai5948
@sheerasai5948 - 05.07.2021 07:39

excellent 👍🏻

Ответить
@christosam5374
@christosam5374 - 30.06.2021 17:01

You are the best Teacher ❤️🙏🏻

Ответить
@ankush_in_sync5998
@ankush_in_sync5998 - 29.06.2021 16:28

I have a question.
here you said we are not using round brackets as the it will be the function call.
so, why in previous videos of counter we used <button onClick {() => this.changeMessage()}>
There we used round brackets ? why?? please Explain??

Ответить
@simple8810
@simple8810 - 16.06.2021 17:54

One thing I will add here even me at first glance got confused that ,Sir used function keyword ( function eventHandler () ) in function base components but didnot use that when using class i.e , eventHandle(){
console.log("button clicked")
the reason is it is same syntax as or pure Js for classes like we add method in Js class like
getResult(){
console.log("hello")}


so functions are method in classe,no need of using function keyword
hope this help

Ответить
@harishkanna6079
@harishkanna6079 - 31.05.2021 11:29

In a normal HTML application, we pass the event handler along with the round brackets inside double-quotes. What is the difference between that and passing the function reference inside curly braces in react?

Ответить
@viveks2619
@viveks2619 - 18.05.2021 18:39

An observation, that the passing event handler as a function will work if you use an
arrow function inside the paranthesis.

Ответить
@salsabilalailyrahma3251
@salsabilalailyrahma3251 - 13.04.2021 18:36

Thank you sir. I can understand from your explanation. It's really helpfull to do my homework. From Indonesia

Ответить
@oliveranderson7962
@oliveranderson7962 - 19.03.2021 21:26

Man, this was so helpful. Thanks a lot!! ♥

Ответить
@zhenduan9138
@zhenduan9138 - 19.03.2021 05:10

is not correct to write something like the following?

class MyComponent extends Component{
function myFunction(){

}

}

Have to remove function, only keep myFunction()?

Ответить
@612_somnathmalik3
@612_somnathmalik3 - 13.03.2021 13:01

Thank you sir for such videos.

Ответить
@kadirramazn
@kadirramazn - 09.03.2021 12:07

You're so good at teaching my friend. +15012

Ответить
@Siddharth-yi7pg
@Siddharth-yi7pg - 08.03.2021 06:50

Can we use using event listeners

Ответить
@MikeMike-ms1ns
@MikeMike-ms1ns - 16.02.2021 20:03

what if you want to pass a value to an event handler?

Ответить