Handle events by arrow functions in React app
Miron Machnicki

Hi with regard to the handler-react-3.js just now I have tried to modify the arguments to two and I found it works. Let’s see my example.

class Application extends React.Component {
 this.handleClick = this.handleClick.bind(this)
 handleClick(item1, item2){
 return function(event){
 alert(‘1: ‘ + item1 + ‘ 2: ‘ + item2 + ‘ event: ‘ + event.target)

render() {
 return <div>
 <h1 onClick={this.handleClick(‘Foxy’, ‘Tanuki’)}>Hello, ES6 with Mango</h1>

So perhaps you could update your document to show this additional functionality. Thanks.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.