Skip to content Skip to sidebar Skip to footer
Showing posts with the label Es6 Class

Javascript Class Property Inside Vs Outside Constructor

I'm struggling to understand the difference between defining a property inside vs outside the c… Read more Javascript Class Property Inside Vs Outside Constructor

Es6 Class Extends Array: Workaround For Es5 Babel Transpile

I have some ES6 class inherited from Array: class Cache extends Array { add(item) { if(!item.… Read more Es6 Class Extends Array: Workaround For Es5 Babel Transpile

Serializing An Es6 Class Object As Json

class MyClass { constructor() { this.foo = 3 } } var myClass = new MyClass() I'd like… Read more Serializing An Es6 Class Object As Json

How To Override A Base Class Constructor In Javascript

The Udacity ES6 training has a question about overriding a base class constructor. I've got a s… Read more How To Override A Base Class Constructor In Javascript

Conditional Export In ES2015

Let's say you're developing a polyfill and don't want to shim a class if it already exi… Read more Conditional Export In ES2015

ES6 Functions, Arrow Functions And 'this' In An ES6 Class

class App extends Component { constructor(props) { ... } onChange = (e) => this.setSt… Read more ES6 Functions, Arrow Functions And 'this' In An ES6 Class