title: React - member function is not a function when called in initial state (outside constructor)
body: <p>I have a react class with a member function that initializes the state:</p>
  
  <pre><code>class SomeComponent extends Component {
    state = this.getInitialState(this.props)
  
    getInitialState = (props) =&gt; {
      // return some state based on props
    }
  }
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>Unhandled Rejection (TypeError): _this.getInitialState is not a function
  </code></pre>
  
  <p>However if I have a constructor declared explicitly, then the component works fine</p>
  
  <pre><code>class SomeComponent extends Component {
    constructor(props) {
      super(props)
      this.state = this.getInitialState(this.props)
    }
  
    getInitialState = (props) =&gt; {
      // return some state based on props
    }
  }
  </code></pre>
  
  <p>Why does this happen?</p>
  
  <p>EDIT: I am using create-react-app so babel should be configured to accept this syntax</p>