title: Unhandled promise rejection error in react native?
body: <p>I am using axios to fetch data from API endpoint. I am getting error -> Possible unhandled promise rejection Type error: undefined is not a function (evaluating res.json() ) </p>
  
  <p>I am using react-redux and redux-thunk with react native app.</p>
  
  <p>venueAction.js :</p>
  
  <pre><code>import { FETCH_VENUES } from './types';
  import axios from 'axios';
  
  export const fetchVenues = () =&gt; dispatch =&gt; {
      axios.get(`my_api_link`)
      .then( res =&gt; res.json())
      .then( venues =&gt; 
          dispatch({
              type: FETCH_VENUES,
              payload: venues
          })
      )
      .catch( error =&gt; {
          console.log(error);
      });
  };
  </code></pre>
  
  <p>Check screenshot below:</p>
  
  <p><a href="https://i.stack.imgur.com/UdyvL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UdyvL.png" alt="enter image description here"></a></p>