I am trying to make an Axios call from my React Native app, but I get the following error:
Here is a snippet of the code I'm using. This is based off an axios tutorial I tried which worked, but instead of getting 'response.data' I am just trying to get 'response.message' to see if it's actually connecting.
FYI I created my API using Node.js and Express.
I believe you have are runing both applications on development and if that is true you will have little issue accessing your local API runing on your computer from your phone.
Solution 1
Because your phone and computer are connected on the same network it means they can find each other on that network using each others ip addresses.
Solution 2
You can try using chrome port forwarding