3

Description

I have used react-native-navigation(V2) Wix in my react-native app. I have got error if pop the componentId.

Error::

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;

Please tell how to remove is warning.

Harleen Kaur Arora
  • 1,949
  • 2
  • 23
  • 55
  • 1
    Can you please give some context to what you are trying to achieve? Popping a stack in `componentDidDisappear` seems like a smell. – guy.gc May 31 '19 at 19:44

0 Answers0