eslint-plugin-ember
eslint-plugin-ember copied to clipboard
Good practice to remove computed properties
I have the following code:
import Component from '@glimmer/component';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
export default class AuthContainerComponent extends Component {
@service tenant;
@alias('tenant.company') currentCompany;
}
In order to stop using alias. I could use tenant.company directly in the template or add a getter like this:
get currentCompany() {
return this.tenant.company;
}
How are you migrating this? What is the good practice here?