goatslacker / goatslacker/alt

sequentially perform actions that require source retrieval at same time

Open
#708 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
312
PR merge metrics
No merged PRs in 30d

Description

Can we have the ability to sequentially perform actions that require source retrieval at same time?

```
class SearchStore {
constructor() {
this.state = { value: '' };

this.registerAsync(SearchSource);
}
onSearch() {
if (!this.getInstance().isLoading()) {
this.getInstance().performSearch();
}
}
}
```
Note the isLoading call. What can I do when I have multiple components relying on the same store that want to call onSearch (via an action) at (relatively) the same time. The second call will come while the store "isLoading" the results for the first call, and thus the second call will do nothing? Is there an Alt way that I can queue up multiple calls while one is taking place?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.