Hacker News new | ask | show | jobs
by lobster_johnson 4247 days ago
You can use ES6 classes today:

    class Button {
      render() {
        return <button>{this.props.label}</button>;
      }
    }

    Button = React.createClass(Button.prototype);
Of course, it would have been nice to be able to skip that last line, and extend/mix in some React base class instead.