disposer-util
v1.0.12
Published
Disposer class and Disposable interface
Downloads
464
Readme
disposer-util
Disposer class and Disposable interface
usage
import { Disposable, Disposer } from "disposer-util";
export class SomeModel implements Disposable {
private disposer = new Disposer();
constructor(){
this.disposer.add(
reaction(() => this.someProp, console.log)
);
}
dispose() {
this.disposer.dispose();
}
}