Screen1.js
import React,{useEffect} from 'react' import {View,Text} from 'react-native' import * as firebase from 'firebase/app'; import '@firebase/firestore'; const Screen1 = props =>{ useEffect(() => { var dbh = firebase.firestore().collection("Jots").doc("note"); dbh.set({name:"pradeep"}) //The yellow warning is popped up in this line. }); return( <View> <Text>Title</Text> </View> ) } console
[Unhandled promise rejection: ReferenceError: Can't find variable: atob] Stack trace: node_modules\@firebase\firestore\dist\index.cjs.js:23101:0 in <global> http://192.168.0.108:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:131203:60 in fromBase64String I just followed the guide in the expo documentation but still don't know why this problem is occurring. Need a clear explanation on this. And also what is atob variable?
atobis a function to decode a Base64 encoded String.btoa, on the other hand, encodes a String to Base64 (Base64 encoding and decoding)windowin the browser env, which isn't available unless specifically ported over. You could try and download an NPM module.react-native-firebase.