8000 Promisify everything · Issue #3 · react-native-contrib/rsx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 2, 2018. It is now read-only.

Promisify everything #3

Open
2 tasks
hassankhan opened this issue May 16, 2016 · 5 comments
Open
2 tasks

Promisify everything #3

hassankhan opened this issue May 16, 2016 · 5 comments

Comments

@hassankhan
Copy link
Member
hassankhan commented May 16, 2016
  • Add bluebird to rsx-common
  • All promise-based versions of RSX plugins should be part of v0.2.*

Useful link: https://60devs.com/best-practices-for-using-promises-in-js.html

@RangerMauve
Copy link

Maybe instead of Bluebird use built in promises with a polyfill?

@hassankhan
Copy link
Member Author

Aren't Bluebird promises more performant? That was the only reason I was thinking of using them - is there a link you could point me to for the polyfill?

@RangerMauve
Copy link

Pretty sure they are, but for interop it's nice to have just the bare promise implementation without all the fancy combinators that people will have to learn to contribute. That will probably also make it easier when this eventually migrates to async functions.

In terms of polyfills, you could even just make use of bluebird, but there's also es6-promise, promise-polyfill, promise, and a slew of others to choose from.

@hassankhan
Copy link
Member Author

I'm not too confident writing my own polyfill, thinking of using any-promise with Bluebird. Is it as simple as doing that or am I missing something else?

BTW thanks for all your input, highly appreciated 😄

@RangerMauve
Copy link

Definitely don't bother writing your own. Any-promise is pretty sweet, I've used it in a bunch of projects so far. Though in my case I was leaving it up to users to actually install the polyfill they wanted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants
0