gpt4 book ai didi

javascript - React native,添加 Root View 时出错

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:14:16 25 4
gpt4 key购买 nike

我一直在尝试在我的项目中使用“react-native-popup”,渲染弹出窗口时在红屏中出现以下错误。如果我重新加载,该消息将被视为警告,应用程序运行正常,但错误消息偶尔会出现。我想知道这是什么问题?

Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addMeasuredRootView.

这是我在渲染函数中使用它的方式:

<Popup ref={popup => this.popup = popup }/>

最佳答案

如果您遇到类似下面屏幕截图的问题,请尝试通过点击重新加载按钮重新加载应用程序。如果我对已经有一些异常/错误的代码进行了一些更改,我就会收到此错误。我希望这对我有所帮助,因为它几乎每次都对我有用。

enter image description here

关于javascript - React native,添加 Root View 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44710520/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com