是否可以在 React Native 标签中使用 <div> 标签?

Sat*_*ill 6 react-native

现在我使用 firebase JS SDK 来使用电话身份验证。我跟着web method.

这是我的代码:

  handleClick = () => {
    this.state.verify_otp = "flex";
    this.state.register = "none";
    this.recaptcha = new firebase.auth.RecaptchaVerifier("recaptcha1");
    this.number = this.state.phone;
  };
Run Code Online (Sandbox Code Playgroud)

<View
    style={{
        alignItems: "center",
        justifyContent: "center",
        flex: 1,
        display: this.state.captcha,
    }}
>
    <div>
        <div id="recaptcha1"></div>
    </div>
</View>
Run Code Online (Sandbox Code Playgroud)

是否可以在react-native代码中使用标签?

Hye*_*ran 1

不,不可能在react-native中使用html标签

编辑:基本 RN 组件列表https://reactnative.dev/docs/components-and-apis#basic-components