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.
Hi, I love your lessons about React. Can you share what autocomplete/shortcut plugins you are using?
Thank you
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?
to avoid binding in a constructor, the 'update' method should be an array function.
hi, Im getting a index.js:1446 Warning: Expected onTouchStart
listener to be a function, instead got a value of boolean
type.
wsid?