Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigator.dismiss(payload) does not provide payload to Promise<NavigationResult> #142

Open
dlindahl opened this issue Aug 24, 2017 · 1 comment

Comments

@dlindahl
Copy link

When calling dismiss(payload), the payload object is never available as a return value to the Navigator.present Promise.

// screen_a.js
Navigator.present(SCREEN_B).then(result => {
  console.info(result)
  // { code: -1 }
})

// screen_b.js
Navigator.dismiss({ success: true })

No matter what I provide to dismiss, all I ever get is the NavigationResult code and never a payload key.

Is this feature not yet functioning or am I missing something from the docs?

@hitbear518
Copy link

I have tried to fix it, check this out #143

dlindahl added a commit to sloppymoose/sloppymoose that referenced this issue Sep 4, 2017
While this relies heavily on native-navigation, I did end up having to bring
in a cross-platform JS-based TabBar library because the TabBar implementation
in native-navigation does not seem to be fully fleshed out (works via custom
swift code)

With just a small bit of wrangling in the HomeScreen's implementation of
TabViewAnimated, I was able to achieve something that looks good.

That said, there is a bug (or some confusion) when returning state from
`Navigation.present` from `Navigation.dismiss` which is tracked at
airbnb/native-navigation#142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants