Name: ember-auto-computed
Owner: simplabs
Description: null
Created: 2017-02-08 16:32:04.0
Updated: 2017-10-14 18:18:29.0
Pushed: 2017-04-03 11:38:51.0
Homepage: null
Size: 33
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ember-auto-computed introduce a mechanism for computed properties to automatically track their dependent keys so they don't have to be defined upfront.
This is an experiment and not (at all!!!) ready for production use!!!
The classic fullName
example looks like this with ember-auto-computed:
llName: computed(function() {
return `${this.get('firstName')} ${this.get('lastName')}`;
This is fully functional and will be re-evaluated when either the firstName
or lastName
properties change!
A slightly more involved example illustrates the potential performance improvements that something like ember-auto-computed could result in:
op: computed(function() {
(this.get('a')) {
return this.get('b');
else {
return this.get('c');
As dependent keys are recorded when the computed property function is executed,
this property will never depend on all of a
, b
, c
at the same time but
only on either a
and b
when a
is truthy or c
if a is falsy. That of
course leads to less invalidations (there is no need to invalidate the property
if b
changes when a
is falsy anyway).
ember-auto-computed is developed by and © simplabs GmbH and contributors. It is released under the MIT License.
ember-auto-computed is not an official part of Ember.js and is not maintained by the Ember.js Core Team.