tracked-tools / ember-could-get-used-to-this

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arguments only used in `update` hook are not tracked

mydea opened this issue · comments

It took me some time to figure it out, but it seems that arguments only used in the update hook (no matter if named or positional) are not properly tracked.

I made a failing test case here:

mydea@4b051ca

E.g.:

 class extends Resource {
        @tracked value;

        setup() {
          this.value = this.args.positional[0];
        }

        update() {
          if (this.args.named.shouldReload) {
            this.value = `${this.args.positional[0]} RELOADED`;
          }
        }
      }

Changing shouldReload will not trigger the update.