Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Firebase Firebase.app().options返回对象{}_Javascript_Reactjs_Firebase_React Native_Firebase Authentication - Fatal编程技术网

Javascript Firebase Firebase.app().options返回对象{}

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

我正确地设置了firebase phone auth(我想),但它抛出了一个错误,为什么会发生这种情况? 这方面的代码是:

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;