Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Use promises instead of callbacks #1

Open
Polve opened this issue Apr 2, 2016 · 4 comments
Open

Use promises instead of callbacks #1

Polve opened this issue Apr 2, 2016 · 4 comments

Comments

@Polve
Copy link

Polve commented Apr 2, 2016

Since this library is mostly a rewrite of the old one, I think it makes sense to use ES6 and promises instead of callbacks.
This does not restrict its use on browsers due to browserify and promises polyfill. An example of library using es6 promise polyfill is https://github.com/matthew-andrews/isomorphic-fetch

@JSteunou
Copy link
Owner

JSteunou commented Apr 2, 2016

Agreed it is on my todo list. PRs are welcome if you wanna try.
Le 2 avr. 2016 08:59, "Alessandro Polverini" [email protected] a
écrit :

Since this library is mostly a rewrite of the old one, I think it makes
sense to use ES6 and promises instead of callbacks.
This does not restrict its use on browsers due to browserify and promises
polyfill. An example of library using es6 promise polyfill is
https://github.com/matthew-andrews/isomorphic-fetch


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1

@DzmitryShylovich
Copy link

I think Observables from rxjs is a better choice as they have a lot of advantages over promises.

Observables and type definitions will make this library very attractive to use in conjunction with angular 2 (second version of the most popular front end framework).

@JSteunou
Copy link
Owner

PR are welcomed @DzmitryShylovich ;)

@fpozzobon
Copy link

I've created a library with observable (strongly inspired from yours, I hope you don't mind about that :))
you can see it on https://github.com/fpozzobon/webstomp-obs
I didn't want to create a PR as the usage of it is a lot different in fact...

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

4 participants