Promise reference in core?
See original GitHub issueTake a look at this line currently in master: https://github.com/hyperapp/hyperapp/blob/ffe9209cd2a5ce9927c0dfb55830c4577459d2c4/src/index.js#L65
What’s the purpose of && !result.then
?
Does Hyperapp really care if the result is a Promise
?
All the tests still pass with this removed, including one that actually returns a Promise
: https://github.com/hyperapp/hyperapp/blob/ffe9209cd2a5ce9927c0dfb55830c4577459d2c4/test/actions.test.js#L75-L100
What am I missing? 🤔
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Promise - JavaScript - MDN Web Docs
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
Read more >core-promise - npm
A promise implementation that is fully conformant to the Promises/A+ spec, passing all the 872 tests from the reference tests, and most of...
Read more >The Core of Promises in JavaScript | by Belle Poopongpanit
A common JavaScript concept that we find interviewers asking about are promises. “Explain what a promise is” or “show me how promises work....
Read more >JavaScript Promise with Examples - Dot Net Tutorials
In this article, I am going to discuss the JavaScript Promise with Examples. JavaScript promise is same as a promise we make in...
Read more >Promise.resolve is not bound to Promise object #127 - GitHub
Binding constructor will break subclassing. I think It's not really true. It's just Promise constructor functions that behave that way, e.g. you ...
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 Free
Top 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
Allowing user to reuse Promise resolving to await async actions in sequence is really helpful.
I am going to close here because the question has been answered, if there’s another question or proposal that you would like to make, please create a new issue! 👍