Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class Square extends React.Component {
  2. render() {
  3. return (
  4. <button
  5. className="square"
  6. onClick={() => this.props.onClick()}
  7. >
  8. {this.props.value}
  9. </button>
  10. );
  11. }
  12. }
  13.  
  14. function Square(props) {
  15. return (
  16. <button className="square" onClick={props.onClick}>
  17. {props.value}
  18. </button>
  19. );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement