Hacker News new | ask | show | jobs
by josebalius 4247 days ago
So are ES6 classes for components coming in 0.13?
2 comments

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.
Maybe. We're still working on the details about what that will look like. Chances are we'll have some basic support if you're doing a limited set of things. Stay tuned.