title: how to async/await redux-thunk actions?
body: <p>action.js</p>
  
  <pre><code>export function getLoginStatus() {
    return async(dispatch) =&gt; {
      let token = await getOAuthToken();
      let success = await verifyToken(token);
      if (success == true) {
        dispatch(loginStatus(success));
      } else {
        console.log("Success: False");
        console.log("Token mismatch");
      }
      return success;
    }
  }
  </code></pre>
  
  <p>component.js</p>
  
  <pre><code>  componentDidMount() {
      this.props.dispatch(splashAction.getLoginStatus())
        .then((success) =&gt; {
          if (success == true) {
            Actions.counter()
          } else {
            console.log("Login not successfull");
          }
       });
     }
  </code></pre>
  
  <p>However, when I write component.js code with async/await like below I get this error:    </p>
  
  <p><code>Possible Unhandled Promise Rejection (id: 0): undefined is not a function (evaluating 'this.props.dispatch(splashAction.getLoginStatus())')</code></p>
  
  <p>component.js</p>
  
  <pre><code>  async componentDidMount() {
       let success = await this.props.dispatch(splashAction.getLoginStatus());
       if (success == true) {
         Actions.counter()
       } else {
         console.log("Login not successfull");
       }
     }
  </code></pre>
  
  <p>How do I await a getLoginStatus() and then execute the rest of the statements?
  Everything works quite well when using .then(). I doubt something is missing in my async/await implementation. trying to figure that out.</p>