3 ms·
I've used this syntax which auto-binds this, worked for me class Thing { method1 = () => {} method2 = () => { something.addEventListener('click
by have_faith 4y ago
I've used this syntax which auto-binds this, worked for me
class Thing {
method1 = () => {}
method2 = () => {
something.addEventListener('click', this.method1);
}
}
- agumonkey 4y agoFun trick. A bit tangled though