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

Need the observer api #153

Open
AirChen opened this issue Aug 10, 2020 · 5 comments
Open

Need the observer api #153

AirChen opened this issue Aug 10, 2020 · 5 comments

Comments

@AirChen
Copy link

AirChen commented Aug 10, 2020

In This Case:

When I develop a POI search function of a Driver Guidance Application , there is some difference POI requests . I used the promise to implement those difference requests , but every result of each request is tightly following it's request .👻 I want to integrate all results together , to display different UI in the common View . So I need a new API to observe all promise handled cases .

@shoumikhin
Copy link
Contributor

Hi AirChen, is there a reason you don't want to simply chain the same block on all promises you're interested in, but rather prefer an observer object to store such blocks and chain the observer for each promise instead?

@AirChen
Copy link
Author

AirChen commented Aug 10, 2020

@shoumikhin Thanks for your reply , but in some case that you have a branch of promises to request a list of items , and all blocks are needed for this function . Putting those blocks together could be better , in my opinion. 😁

@AirChen
Copy link
Author

AirChen commented Aug 10, 2020

For this pull request #152

@ykjchen
Copy link
Collaborator

ykjchen commented Aug 24, 2020

@AirChen are there other promises libraries with similar API? I'm wondering if this is common; I'd be interested in looking through discussions other folks have had about this pattern.

@AirChen
Copy link
Author

AirChen commented Aug 25, 2020

Emmm… Sometime , I think those APIs is better for debugging…

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

3 participants