title: Using props to seed initial state in react without using React.createClass
body: <p>I want to seed my component state using data from my props like the example here: <a href="https://facebook.github.io/react/tips/props-in-getInitialState-as-anti-pattern.html" rel="nofollow">https://facebook.github.io/react/tips/props-in-getInitialState-as-anti-pattern.html</a></p>
  
  <pre><code>getInitialState: function() {
      return {count: this.props.initialCount};
  },
  </code></pre>
  
  <p>Look near the bottom where it says "However, it's not an anti-pattern if you make it clear that the prop is only seed data for the component's internally-controlled state:" That is exactly what I want to do.</p>
  
  <p>This works great when using React.createClass, but I'd like to do this using ES6 classes if possible. But when using ES6 classes, initial state is provided as a static property on the class. If you try to implement getInitialState(), you'll get an error. This means that I don't get the opportunity to compute it after props are available. See the section titled "ES7+ Property Initializers" at <a href="https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#es7-property-initializers" rel="nofollow">https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#es7-property-initializers</a></p>
  
  <p>In that section, they provide an example where the initial state is computed similar to the old getInitialState method, by simple setting this.state in the constructor. However, when I tried this, this.props was not set yet.</p>
  
  <p>I have searched for a lifecycle method for when the props are initially set for the first time so that I can set the state at that moment, but I can't find any such lifecycle method.</p>
  
  <p>Must I use React.createClass or is there a way to seed my initialState when using ES6 classes extending React.Component?</p>