Practice
You can use an arrow function to wrap around the event handler and pass parameters:
<button onClick={() => this.handleClick(id)} />
This is equivalent to calling .bind
.bind
Comments