Setting up React for ES6 ES2015 with Webpack and Babel

This resource came in quite handy when setting up React in combination with ES6 ES2015, Webpack and Babel. Installing all the required dependencies: # Install Webpack npm install –save-dev webpack # Install the Babel Loader, for use with Webpack npm install –save-dev babel-loader # Install the es2015 and react presets, for use with Babel npm …

ES6 ES2015 in Depth

There’s a good set of articles on ES6 ES2015 over at Pony Foo: Promises, Arrow Functions, Template Literals, Classes, Modules, Array Extensions, Destructuring, Iterators, Maps, Proxies, … it’s all covered. The post ES6 ES2015 Overview in 350 Bullet Points is a nice summary of ‘m all. Pony Foo: Articles tagged es6-in-depth →

ES6 ES2015 Arrow Functions and this

Why you’d want to use arrow functions (next to them being shorter to type): Arrow functions will maintain the this value of the enclosing context Yes, this will work just fine: function Wilto() { this.age = 32; setInterval(() => { this.age++; console.log( “I am now ” + this.age + ” years old”); }, 3000 ); …