There are several articles which suggest that Lightning support Promises with a polyfill, but still ES6 generators are not supported.

Prove me if I am wrong.

What is the point of supporting Promises but not supporting ES6 generators?

Isn't the main point of Promises to be able to write synchronous-like code which executes asynchronously?


My guess is that Promises can be reliably polyfilled but Generators require the JavaScript interpreter to understand the new function* syntax. Not sure where all the browsers are on that. Or what impact that would have on the Lightning framework. Promises on their own let you do some things more cleanly.

(If you are using Promises in your Lightning code do see Promise and access to access=private attributes.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.