Skip to content

Instantly share code, notes, and snippets.

@derfloscher
Created October 19, 2016 10:19
Show Gist options
  • Save derfloscher/ed85258fbe1a6a4fa6c4b35cd7002d9a to your computer and use it in GitHub Desktop.
Save derfloscher/ed85258fbe1a6a4fa6c4b35cd7002d9a to your computer and use it in GitHub Desktop.
class Example {
@observable private _name;
private counter = 0;
@computed
get name(): string {
return this._name;
}
set name(value: string) {
this._name = value;
this.counter++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment