Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Square extends React.Component {
- render() {
- return (
- <button
- className="square"
- onClick={() => this.props.onClick()}
- >
- {this.props.value}
- </button>
- );
- }
- }
- function Square(props) {
- return (
- <button className="square" onClick={props.onClick}>
- {props.value}
- </button>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement