by acdha · 9y ago · 0 comments
class X {
id = (x) => x;
}
See here:https://github.com/jeffmo/es-class-fields-and-static-propert...
E.g. el.onClick((e) => {this.doSomething();});
In that case something else will invoke the onClick callback but we want the ‘this’ context to the same as when we set up the onClick.