← React Beginner Questions - Set 11 Q107
React Beginner Questions - Set 11
// Function component: no binding needed
<button onClick={this.handleClick}> // class: bind in constructor or use an arrow field
handleClick = () => this.setState({ open: true });