4 ms·
The language can do that for you: class Foo { checkStorage = () => { // Do check storage stuff here } } And the language will tak
by mikewhy 9y ago
The language can do that for you:
class Foo {
checkStorage = () => {
// Do check storage stuff here
}
}
And the language will take care of binding the function. (Really, it's just doing `this.checkStorage = this.checkStorage.bind(this)` in the constructor).
- allover 9y agoThat's not in 'the language' yet :)