When I run expo in android the data is undefined, but when run on web, its works.
It is the code
firebase version 9.1.3
This is the code
const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
};
initializeApp(firebaseConfig);
const db = getFirestore();
export default function App() {
const unsub = onSnapshot(doc(db, "collection1", "test1"), (doc) => {
console.log(doc.data());
});
Please help me what to do.