ReactJS: What is "Cannot read property 'then' of undefined"?
<p>I have two method calls within a function called <code>loginUser()</code>. The first passes in userInfo and makes an API request, and then would like to execute the method to empty out the login text fields.</p>

<p>But I am getting the error <code>Cannot read property 'then' of undefined</code>. What may be the issue?</p>

<p>Code:</p>

<pre><code>  _loginUser() {
    this.props.loggingInUser(this.props.userInfo) //Would like to finish this first before moving onto calling this.props.emptyLoginTextFields()
    .then(() =&gt; { //Here is where the error is occurring
      this.props.emptyLoginTextFields()
    })
  }
</code></pre>

<p>Thank you in advance!</p>