In react native application, the backend returns a simple json and I want to use it with axios on the client side, but it gives an error that I have never seen.
it works when i use a different api
useEffect(() => {
axios
.get("https://jsonplaceholder.typicode.com/users")
.then((res) => setData(res.data[0]));
}, []);
return (
<View style={styles.container}>
<Text>Welcome {data.name}!</Text>
<StatusBar style="auto" />
</View>
);
Then i will get this.
[AxiosError: Network Error]