« All deprecation guides
Deprecation Guide for Deprecate import notEmpty from @ember/object/computed
until: 7.0.0
id: deprecate-import-not-empty-from-object-computed
notEmpty
from @ember/object/computed
is deprecated.
Before:
import { notEmpty } from '@ember/object/computed';
class ListState {
items = [];
@notEmpty('items') hasItems;
}
After:
import { isEmpty } from '@ember/utils';
class ListState {
items = [];
get hasItems() {
return !isEmpty(this.items);
}
}