Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.14 KB

no-volatile-computed-properties.md

File metadata and controls

41 lines (29 loc) · 1.14 KB

ember/no-volatile-computed-properties

💼 This rule is enabled in the ✅ recommended config.

Volatile computed properties are deprecated as of Ember 3.9.

Rule Details

This rule disallows using volatile computed properties.

Examples

Examples of incorrect code for this rule:

const Person = EmberObject.extend({
  fullName: computed(function () {
    return `${this.firstName} ${this.lastName}`;
  }).volatile()
});

Examples of correct code for this rule:

const Person = EmberObject.extend({
  // Native getter:
  get fullName() {
    return `${this.firstName} ${this.lastName}`;
  }
});

References