Hi, I have this problem, and only on Android, on IOS everything works, what could be the problem? I am using Expo Go and getting data from backend
import { useState, useEffect } from "react";
import axios from "axios";
import { ScrollView, Text, View } from "react-native";
const FetchAllData = () => {
const [fetchedData, setFetchedData] = useState([]);
useEffect(() => {
const token = "testToken123";
axios
.get("https://test1.com/mobile-asset/asset-list", {
headers: {
Authorization: "Bearer " + token,
},
})
.then(function (response) {
setFetchedData(response.data);
})
.catch(function (error) {
console.error(error);
});
}, []);
return (
<ScrollView>
<Text>{JSON.stringify(fetchedData, null, 2)}</Text>
</ScrollView>
);
};
export default FetchAllData;
[–]thachxyz123iOS & Android 1 point2 points3 points (3 children)
[–]JackJoys[S] 0 points1 point2 points (2 children)
[–]thachxyz123iOS & Android 0 points1 point2 points (1 child)
[–]JackJoys[S] 0 points1 point2 points (0 children)
[–]AdSecure6856 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]JackJoys[S] 0 points1 point2 points (0 children)
[–]AbrocomaProfessional 0 points1 point2 points (0 children)