Joey Baker
Joey Baker
Wow – thanks! Everything you say makes sense. :+1:
Thanks!
You bet: ``` js … derived: { // current behavior mySyncProperty: { deps: ['aProp'] , fn: function deriveMySyncProperty(){ return this.aProp + 1 // mySyncProperty now set } } // proposed...
I would vote "yes" for a second `change` event. As you say, it's expected behavior that every time the state changes, we get a "change" event. That wouldn't be a...
@HenrikJoreteg the only downside with the current approach is that you have to manually add change even listeners to run the `calculateDrivingDistance` method. The nice part about derived properties is...
IMHO, leaving `model.drivingDistance` as `undefined` is okay. If we were to hook things up manually, that's what would happen.
I like @chesles suggestion of a `async: true` option. That would make the async derived properties explicit.
FWIW, Grunt opted for "Gruntfile.js". I mention it only because the `file` suffix is easier to type than `Config`.
Once this is in a good place, it's probably a good idea to use the same logic in the `no-direct-mutation-state` rule.
Yea, `++` and `--` are good calls. Can do. I'd love to share code between this and `no-direct-mutation-state`. Perhaps the way to do that is to add `isPropsNode` and the...