'use strict';

const exxx = React.createElement;

class LikeButton extends React.Component {
  constructor(props) {
    super(props);
    this.state = { liked: false };
  }

  render() {
    if (this.state.liked) {
      return 'You liked this.';
    }

    return exxx(
      'button',
      { onClick: () => this.setState({ liked: true }) },
      'Like'
    );
  }
}
