React-native-navigation: await Navigation.showModal doesn't return the componentId

Created on 5 Sep 2018  路  6Comments  路  Source: wix/react-native-navigation

Issue Description

await Navigation.showModal isn't return the componentId.

const compId = 
await Navigation.showModal({
    stack: {
      children: [{
        component: {
          id: 'my.screen.id,
          name: 'my.screen.name
          passProps: {...}
        }
      }]
    }
  });

compId is `undefined

Steps to Reproduce / Code Snippets / Screenshots

await showModal('123', ...);
await dismissModal('123');
showModal('123', ...); // Crash---

Environment

  • React Native Navigation version: 2.0.2524
  • React Native version: 0.51
  • Platform(s) (iOS, Android, or both?):iOS only
  • Device info (Simulator/Device? OS version? Debug/Release?): device + simulator, debug + release, all OS versions
Wix iOS

Most helpful comment

I'm still seeing this problem. Don't see how it's resolved b/c there's no code associated with the issue.

All 6 comments

@gran33
Can you assign the stack a predefined id?

Navigation.showModal({
    stack: {
      id: 'MyStack'
      children: [{
        component: {
          id: 'my.screen.id,
          name: 'my.screen.name
          passProps: {...}
        }
      }]
    }
  });

Then you could dismiss the modal using Navigation.dismissModal('MyStack');
Will this be suitable for now?

If I do so, that says that the componentId already exists.

resolved

I'm still seeing this problem. Don't see how it's resolved b/c there's no code associated with the issue.

Still seeing this in "react-native-navigation": "^2.16.0"

Any clue as to why that was closed, the error originates here:
https://github.com/wix/react-native-navigation/blob/master/lib/ios/RNNModalManager.m#L39

and that's not resolved yet.

Fixed in 2.18.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zagoa picture zagoa  路  3Comments

viper4595 picture viper4595  路  3Comments

EliSadaka picture EliSadaka  路  3Comments

edcs picture edcs  路  3Comments

zhanguangao picture zhanguangao  路  3Comments