question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow promises as updates return values

See original GitHub issue

feature 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:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
peterpetrecommented, Jun 4, 2018

@erikras Reminder!

1reaction
TiuShcommented, Jun 1, 2018

Did anyone take a look on this issue & PR ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found