Normalize Events with Reacts Synthetic Event System

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

Event handlers are passed an instance of SyntheticEvent in React. In this video we'll take a look at the wide range of events available to us, including Touch events.

Connie Yu
~ 8 years ago

Hi, I love your lessons about React. Can you share what autocomplete/shortcut plugins you are using?

Thank you

Vishwas Chouhan
~ 7 years ago

this.update = this.update.bind(this) } update(e){ this.setState({currentEvent: e.type}) } render(){ return ( <div> <textarea onKeyPress={this.update}

Confused with the reference to this.update in the constructor, then the eventHandler for textarea calling this.update

onKeyPress={this.update} won't this call the method? Why do we need to have this.update in the constructor binding this.update = this.update.bind(this)?

Do we explicitly need to bind this in ES6?

Yaswanth
~ 6 years ago

to avoid binding in a constructor, the 'update' method should be an array function.

daniel
~ 6 years ago

hi, Im getting a index.js:1446 Warning: Expected onTouchStart listener to be a function, instead got a value of boolean type. wsid?