首页 > 解决方案 > 反应本机导航 Wix Navigation.pop 可能的未处理承诺拒绝(id:0):错误:无法执行堆栈命令

问题描述

描述

我在我的 react-native 应用程序中使用了 react-native-navigation(V2) Wix。如果弹出componentId,我会收到错误消息。

错误::

Possible Unhandled Promise Rejection (id: 0):
Error: Failed to execute stack command. Stack secondScreen not found.
Error: Failed to execute stack command. Stack secondScreen not found.

secondScreen.js

class SecondScreen extends React.PureComponent {

   constructor(props) {
      super(props);
      this.navigationEventListener = Navigation.events().bindComponent(this);
   }

   componentDidDisappear() {
      Navigation.pop(this.props.componentId)
   }

   render() {
      const { handleSubmit } = this.props;
      return (
         <Text>SecondScreen</Text>
      )
   }
}

export default SecondScreen;

请告诉如何删除是警告。

标签: react-nativewix-react-native-navigation

解决方案


推荐阅读