Allow promises as updates return values
See original GitHub issuefeature request
What is the current behavior?
UpdatesByName
and UpdatesForAll
functions don’t handle Promises as return values.
What is the expected behavior?
I’d love to be able to handle asynchronous updates using Promises inside updates
functions.
Other information
I already experimented a little bit with the code, and I’m quite happy with the result. I’m ready to create a PR if you’re willing to accept this feature !
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Promise - JavaScript - MDN Web Docs
Returns a new Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method),...
Read more >Javascript: How to access the return value of a Promise object
Let's see how we can access returned data. 1 - .then() chaining. It is the most simple and the most obvious way. fetch( ......
Read more >How to use Javascript Promises to lazily update data - Winder.ai
To implement the Promise object it requires each call to the asynchronous function to return either resolve or reject callback. If no return...
Read more >Why is the value of this returned promise not updating?
Check the status of the promise by console logging (result). If it returns a pending promise, try async-await which will resolve the promise ......
Read more >How do I make a JavaScript promise return something other ...
Promises don't "return" values, they pass them to a callback (which you supply with .then()). The spec simply sounds confused to me. It's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@erikras Reminder!
Did anyone take a look on this issue & PR ?