Top "Ecmascript-7" questions

Questions about new/changed features in version 7 of the ECMAScript specification officially known as ECMAScript 2016

How can I clone a JavaScript object except for one key?

I have a flat JS object: {a: 1, b: 2, c: 3, ..., z:26} I want to clone the object except for one element: {…

javascript ecmascript-6 ecmascript-harmony ecmascript-7
React with ES7: Uncaught TypeError: Cannot read property 'state' of undefined

I'm getting this error Uncaught TypeError: Cannot read property 'state' of undefined whenever I type anything in the input box …

javascript reactjs ecmascript-6 ecmascript-7
Can you use es6 import alias syntax for React Components?

I'm trying to do something like the following, however it returns null: import { Button as styledButton } from 'component-library' then attempting …

javascript reactjs import ecmascript-6 ecmascript-7
Best way to polyfill ES6 features in React app that uses create-react-app

I've been testing my React.js application on internet explorer, and finding that some ES6/7 code like Array.prototype.includes() …

javascript reactjs ecmascript-6 create-react-app ecmascript-7
How can I `await` on an Rx Observable?

I'd like to be able to await on an observable, e.g. const source = Rx.Observable.create(/* ... */) //... await source; A …

javascript rxjs ecmascript-7
IE does not support Array includes or String includes methods

I have been working on a project and developing a JavaScript framework. The original code is about 700 lines so I …

javascript internet-explorer ecmascript-7
Array.prototype.includes vs. Array.prototype.indexOf

Beyond the improved readability, is there any advantage to includes over indexOf? They seem identical to me. What is the …

javascript ecmascript-7
Find all matching elements with in an array of objects

I have an array of objects I am searching within the array like this let arr = [ { name:"string 1", arrayWithvalue:"1,2", other: "…

javascript ecmascript-6 ecmascript-7
ES6 / ES7 support in Visual Studio 2015 Community

I'm hearing that VS 2015 is supporting the new js syntax but when I open up a project written using aurelia.…

visual-studio-2015 ecmascript-6 aurelia ecmascript-7