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

[feature request] make navigator methods returning a Promise #4824

Closed
gre opened this issue Dec 16, 2015 · 2 comments
Closed

[feature request] make navigator methods returning a Promise #4824

gre opened this issue Dec 16, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@gre
Copy link
Contributor

gre commented Dec 16, 2015

I don't know how feasible and how much work this involve but I would love to have navigator methods retuning promise.

Basically,

navigator.push({}).then(navigationWasSuccessful, navigationWasSomehowAborted);

(but also for almost all navigator.* methods)

This unlock a lot of use-case. One of my best use-case is I have buttons that trigger navigation, and I want to "lock that button" until the navigation is done (meaning the button is not touchable until it's action is completed (succeed or failed)). This is an interesting pattern with buttons and promise. This prevent async stuff (like saving something to the server) to be done twice when double tapping it, in the case of navigation, this also prevent ugly errors when you tap a lot on a navigation button.

@facebook-github-bot
Copy link
Contributor

Hey gre, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@brentvatne
Copy link
Collaborator

Hey @gre - nobody is working actively on the current version of Navigator at the moment, a pull request would be welcome for this, but work is being directed towards a re-written version of Navigator currently :) You can try that out and comment on it here: https://github.com/ericvicenti/navigation-rfc

@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants