Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 988 Bytes

no-volatile-computed-properties.md

File metadata and controls

37 lines (27 loc) · 988 Bytes

no-volatile-computed-properties

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