Top "Ecmascript-next" questions

For questions about upcoming ECMAScript features that are not scheduled to be part of a specific version yet (anything that is a stage 3 or lower proposal).

What does the at symbol (@) do in ES6 javascript? (ECMAScript 2015)

I'm looking at some ES6 code and I don't understand what the @ symbol does when it is placed in front …

javascript reactjs ecmascript-next
Is there a way to short circuit async/await flow?

async function update() { var urls = await getCdnUrls(); var metadata = await fetchMetaData(urls); var content = await fetchContent(metadata); await render(content); …

javascript promise async-await cancellation ecmascript-next
How to use async await function object in Javascript?

Say I have a function object- setObj : function(a,b){ obj.a = a; obj.b = b; } If I have to …

javascript async-await babeljs ecmascript-next
Can async/await be used in constructors?

As the question stated. Will I be allowed to do this: class MyClass { async constructor(){ return new Promise() } }

javascript async-await ecmascript-next
Succinct/concise syntax for 'optional' object keys in ES6/ES7?

There are already a lot of cool features in ES6/ES7 for defining Javascript objects. However, the following pattern is …

javascript ecmascript-6 ecmascript-next ecmascript-7
How to convert BigInt to Number in JavaScript?

I found myself in the situation where I wanted to convert a BigInt value to a Number value. Knowing that …

javascript bigint ecmascript-next
Destructuring object and ignore one of the results

I have: const section = cloneElement(this.props.children, { className: this.props.styles.section, ...this.props, }); Inside this.props, I have …

javascript reactjs destructuring ecmascript-next
Is it better to define state in constructor or using property initializers?

According to this babel documentation, the correct way to use ES6+ with React is to initial components like this: class …

reactjs ecmascript-next
What is the shortest way to modify immutable objects using spread and destructuring operators

I'm looking for a pure function, to modify my immutable state object. The original state given as parameter must stay …

javascript destructuring ecmascript-next
How do I use and apply JavaScript decorators?

I am trying to understand how to use decorators in a very simple piece of code, so I can apply …

node.js decorator ecmascript-next