Javascript Firebase Firebase.app().options返回对象{}
我正确地设置了firebase phone auth(我想),但它抛出了一个错误,为什么会发生这种情况? 这方面的代码是:Javascript Firebase Firebase.app().options返回对象{},javascript,reactjs,firebase,react-native,firebase-authentication,Javascript,Reactjs,Firebase,React Native,Firebase Authentication,我正确地设置了firebase phone auth(我想),但它抛出了一个错误,为什么会发生这种情况? 这方面的代码是: import { FirebaseRecaptchaVerifierModal } from 'expo-firebase-recaptcha'; import firebase from '../database/firebase'; interface props {} const PhoneAuth = (props: props) => { const r
import { FirebaseRecaptchaVerifierModal } from 'expo-firebase-recaptcha';
import firebase from '../database/firebase';
interface props {}
const PhoneAuth = (props: props) => {
const reCaptchaRef = React.useRef<any>(null);
const [phoneNumber, setPhoneNumber] = React.useState<string>('');
const [verificationId, setVerificationId] = React.useState<string>('');
const [verificationCode, setVerificationCode] = React.useState<string>('');
const firebaseConfig = firebase.apps.length
? firebase.app().options
: undefined;
return (
<View style={styles.screen}>
<FirebaseRecaptchaVerifierModal
ref={reCaptchaRef}
firebaseConfig={firebaseConfig}
attemptInvisibleVerification={true}
/>
...
从“expo firebase recaptcha”导入{FirebaseRecaptchhaverifierModal};
从“../database/firebase”导入firebase;
接口道具{}
常量PhoneAuth=(道具:道具)=>{
const reCaptchaRef=React.useRef此文件的外观如何?从“../database/firebase”导入firebase;
此文件的外观如何?从“../database/firebase”导入firebase;