I understand there is a TC-39 proposal for a new syntax called "property initializer syntax" in JavaScript class
es.
I haven't yet found much documentation for this, but it is used in an egghead course when discussing React.
class Foo {
bar = () => {
return this;
}
}
What is the purpose of this proposal? How does it differ from:
class Foo {
bar() {
return this;
}
}
this
to the function, which the arrow function does automatically. – Scleritis