title: Which ReactJS syntax to use; React.createClass or ES6 extends?
body: <p>I'm beginner of ReactJS. I learned and studied a lot of documents and ebooks on various websites. I realize there are two syntaxes for ReactJS. Example:</p>
  
  <pre><code>React.createClass({
    displayName: 'Counter',
    getDefaultProps: function(){
      return {initialCount: 0};
    },
    getInitialState: function() {
      return {count: this.props.initialCount} 
    },
    propTypes: {initialCount: React.PropTypes.number},
    tick() {
      this.setState({count: this.state.count + 1});
    },
    render() {
      return (
        &lt;div onClick={this.tick}&gt;
          Clicks: {this.state.count}
        &lt;/div&gt;
      );
    }
  });
  </code></pre>
  
  <p>And this version is written by ES6:</p>
  
  <pre><code>class Counter extends React.Component {
    static propTypes = {initialCount: React.PropTypes.number};
    static defaultProps = {initialCount: 0};
  
    constructor(props) {
      super(props);
      this.state = {count: props.initialCount};
    }
  
    state = {count: this.props.initialCount};
    tick() {
      this.setState({count: this.state.count + 1});
    }
  
    render() {
      return (
        &lt;div onClick={this.tick.bind(this)}&gt;
          Clicks: {this.state.count}
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>What is the better way to use ReactJS? But I found these libraries, application on github used to perform a lot ES6.</p>