Object.freeze() seems like a transitional convenience method to move towards using const in ES6. Are there cases where both take their place in the code or is there a...
React router allows react apps to handle /arbitrary/route. In order this to work, I need my server to send the React app on any matched route. But webpack dev...
I use the flag --experimental-modules when running my Node application in order to use ES6 modules. However when I use this flag the metavariable __dirname is not available. Is...
I’m rebuilding an old Java project in Javascript, and realized that there’s no good way to do enums in JS. The best I can come up with is: const...
The new ES6 arrow functions say return is implicit under some circumstances: The expression is also the implicit return value of that function. In what cases do I need...
In js file, i used import to instead of require import co from 'co'; And tried to run it directly by nodejs since it said import is ‘shipping features’...
Came to know that from React v15.3.0, we have a new base class called PureComponent to extend with PureRenderMixin built-in. What I understand is that, under the hood this...
Is there a null-safe property access (null propagation / existence) operator in ES6 (ES2015/JavaScript.next/Harmony) like ?. in CoffeeScript for example? Or is it planned for ES7? var aThing =...
Is it possible to create a template string as a usual string, let a = "b:${b}"; and then convert it into a template string, let b = 10; console.log(a.template());...
I’m trying to create a module that exports multiple ES6 classes. Let’s say I have the following directory structure: my/ └── module/ ├── Foo.js ├── Bar.js └── index.js Foo.js...