💼 This rule is enabled in the ✅ recommended
config.
Prevents using .on()
in favour of component's lifecycle hooks.
The order of execution for on()
is not deterministic.
Examples of incorrect code for this rule:
export default Component.extend({
abc: on('didInsertElement', function () {
/* custom logic */
})
});
Examples of correct code for this rule:
export default Component.extend({
didInsertElement() {
/* custom logic */
}
});