i am working on a react-native application for about almost a year now, and a function i wrote earlier suddenly stopped working for now reason.. here's the code snippet:
var array = [];
fetch('https://reqres.in/api/products/3') //different URL, for testing only
.then((response) => response.json())
.then((json) => { array = json; })
.then(() => { console.log("get Remote data DONE" + array);
this code worked great for some time, and now as i had to review my code it suddenly doesn't work anymore.. i get an "network request failed" error msg..
any ideas?