title: React TextArea Component - How to use getInititalState() in ES6?
body: <p>I have a relatively simple snippet, that's been written in JSX/ES6.</p>
  
  <pre><code>import React from 'react'
  
  class TextArea extends React.Component {
    constructor(props) {
      super(props);
    }
    render() {
      return (
        &lt;div&gt;
          &lt;textarea defaultValue={this.props.text}&gt;&lt;/textarea&gt;
          &lt;h3&gt;{this.props.text.length}&lt;/h3&gt;
        &lt;/div&gt;
      )
    }
  }
  
  TextArea.propTypes = {
    text: React.PropTypes.string
  }
  
  
  export default TextArea;
  </code></pre>
  
  <p>Since this class was not generated with <code>React.createClass</code>, attempting to add <code>getInitialState</code> results in a big red console warning: </p>
  
  <blockquote>
    <p>Warning: getInitialState was defined on TextArea, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?</p>
  </blockquote>
  
  <p>How does one properly use the <code>getInitialState()</code> in an ES6 class?</p>