android - 节点尚未附加到 `PropsAnimatedNode.updateView` 中的 View

标签 android react-native

有时我可以看到此消息,但仅在 android 中,我认为每次显示警报时它都会出现。

Alert.alert('Oops!', this.props.user.errorMessage,
     [{
        text: 'OK', onPress: () => console.log('here press');
     }]);

错误是:

enter image description here

有人知道可能导致此问题的原因吗?

谢谢

相关

github Issue

最佳答案

正如我在您链接的 Github Issue 中评论的那样,您的错误可能是由于您尝试使用不存在的 key 调用 mapStateToProps。显然,这只是一个假设,因为我们肯定需要有关您的项目的更多信息。你用 redux 吗?你运行的是哪个 react-native 版本? this.props.user.errorMessage 从哪里来?该 prop 是来自父组件还是来自 reducer?

另外,另一种可能性是您在另一个选项卡中导入了一些不存在的模块,或者未正确导出的模块。

顺便说一句,我在这里留下另一个已解决的问题以供引用:#438

我真的希望这能对你有所帮助,伙计!

关于android - 节点尚未附加到 `PropsAnimatedNode.updateView` 中的 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43618896/

相关文章:

react-native - React - 从另一个组件继承/复制 propTypes

react 原生 FCM : Can't access notification data when the app is in background or killed

javascript - React Native 查找导致可能未处理的 promise 拒绝的原因

java - 实现搜索栏并在空对象引用错误上获取 'java.lang.Object[] java.util.Collection.toArray()'

java - 在单元测试中使用 Intent 类

android - Urbanairship android 无法获取 APID()

android - 在 kotlin 中,如何在目标需要 List 的地方传回 MutableList

javascript - 如何在metro.config中添加多个babelTransformerPath

android - Activity.isFinishing() 返回 true 但错误

ios - 如何修复 Xcode 中的 undefined symbol 错误?