title: Redux - how to call an action and wait until it is resolved
body: <p>I'm using react native + redux + redux-thunk
  I do not have much experience with redux and react native</p>
  
  <p>I'm calling an action inside my component. </p>
  
  <pre><code>this.props.checkClient(cliente);
  
  if(this.props.clienteIsValid){
     ...
  }
  </code></pre>
  
  <p>and within that action there is a call to an api that takes a few seconds.</p>
  
  <pre><code>export const checkClient = (cliente) =&gt; {
      return dispatch =&gt; {
  
          axios.get(`${API_HOST}/api/checkclient`, header).then(response =&gt; {
  
              dispatch({type: CHECK_CLIENT, payload: response.data }); //valid or invalid
  
          }).catch((error) =&gt; {  });
  
      }
  }
  </code></pre>
  
  <p>My question is how can I delay the return of the action until the api response is completed? I need the api response to know if the client is valid or invalid. That is, I need the action to be resolved and then verify that the client is valid or invalid.</p>