[英]I am getting an error while fetching data from firestore(firebase). I am using react native
[英]I am getting this error when trying to login using react native and firebase
AsyncStorage 已被 react-native 弃用(请参阅: https://reactnative.dev/docs/asyncstorage )。
查看此线程以了解有关将 firebase 与替代存储提供程序一起使用的详细信息: https://github.com/firebase/firebase-js-sdk/issues/1847 。 更具体地说,根据这篇文章,您应该像这样使用 auth:
// Import it from your preferred package.
import AsyncStorage from '@react-native-async-storage/async-storage';
// Provide it to initializeAuth.
const auth = initializeAuth(app, { persistence: getReactNativePersistence(AsyncStorage) });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.