Do arrow functions get added to the prototype or the instance of the object? Can they be created directly in the class body or have to be added inside the class constructor?
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.