Implement's emberjs/rfcs#494 for older Ember versions.
- Completely inert when running Ember 3.13 or higher
- Supports Ember.js 2.12, 2.16, 2.18, 3.4, 3.8, 3.12
- Ember CLI v2.13 or above
- Node.js v10 or above
ember install ember-async-observer-polyfill
The best usage guide is the RFC itself emberjs/rfcs#494 but here are a few examples of "before"/"after" to whet your appetite:
Before:
const Person = EmberObject.extend({
firstName: null,
lastName: null,
fullName: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),
fullNameChanged: observer('fullName', function() {
// do something :)
}),
});
After:
const Person = EmberObject.extend({
firstName: null,
lastName: null,
fullName: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),
fullNameChanged: observer({
sync: false,
dependentKeys: ['fullName'],
fn() {
// do something :)
}
}),
});
There are no known limitations, all features described in the RFC are polyfilled.
See the Contributing guide for details.
This project is licensed under the MIT License.