title: When can we avoid using a constructor to initialize state?
body: <p>
  In the example given on the <em>reactnativeexpress</em> website <a href="http://www.reactnativeexpress.com/component_api" rel="nofollow noreferrer">here</a>, <code>state = {count: 0}</code> is used in place of a constructor to initialize the count variable.</p>
  
  <p>In the official Facebook docs <a href="https://facebook.github.io/react-native/docs/state.html" rel="nofollow noreferrer">here</a>, they've said </p>
  
  <blockquote>
    <p>In general, you should initialize state in the constructor, and then call setState when you want to change it.</p>
  </blockquote>
  
  <p>So I created a constructor to initialize <code>count</code> in the same manner:</p>
  
  <pre><code>constructor(props) {
    super(props);
    this.state = {count: 0}
  }
  </code></pre>
  
  <p>The code seems to work the same way (at least on the surface), so what's the difference between creating a constructor and initializing <code>count</code> as in the example?</p>