Top "Ecmascript-6" questions

The 2015 version of the ECMAScript specification, now a standard (ECMAScript 2015).

ES6 export default with multiple functions referring to each other

in es6 there you can define a module of functions like this export default { foo() { console.log('foo') }, bar() { console.…

javascript ecmascript-6
Node.js ES6 classes with require

So up until now, i have created classes and modules in node.js the following way: var fs = require('fs'); …

javascript node.js ecmascript-6
where is create-react-app webpack config and files?

I create a ReactJS project with the create-react-app package and that worked well, but I cannot find webpack files and …

javascript reactjs webpack ecmascript-6 create-react-app
Typescript export vs. default export

What is the difference in Typescript between export and default export. In all the tutorials I see people exporting their …

javascript typescript ecmascript-6
ECMAScript 6 class destructor

I know ECMAScript 6 has constructors but is there such a thing as destructors for ECMAScript 6? For example if I register …

javascript ecmascript-6
How can I conditionally import an ES6 module?

I need to do something like: if (condition) { import something from 'something'; } // ... if (something) { something.doStuff(); } The above code does …

javascript module ecmascript-6
Is this a good way to clone an object in ES6?

Googling for "javascript clone object" brings some really weird results, some of them are hopelessly outdated and some are just …

javascript ecmascript-6 javascript-objects
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
Deep copy in ES6 using the spread syntax

I am trying to create a deep copy map method for my Redux project that will work with objects rather …

javascript ecmascript-6 redux spread-syntax
ES6 exporting/importing in index file

I am currently using ES6 in an React app via webpack/babel. I am using index files to gather all …

javascript ecmascript-6 webpack babeljs