DEV Community

Discussion on: Axios unable to fetch API data after deploying the React App Build.

Collapse
 
andrebclark profile image
Andre • Edited

I had this happen to me before. In my case, the culprit was the URL of the API was not a https URL. the url for the api was not ssl secured so the browser blocked it as it was considered 'mixed content'.

Double check if the live site has ssl(https). If it does then the API url will also need to be a https link. Looking at your code it looks like it's only an http URL.

I hope this helps.

Collapse
 
mesubhokarma profile image
Subho Karmakar

Let me get this thing sorted and will get back to you
Thank you so much for the help.

Collapse
 
andrebclark profile image
Andre

Did that solve it?