ember/closure-actions
January 29, 2026 ยท View on GitHub
๐ผ This rule is enabled in the โ
recommended config.
Always use closure actions (according to DDAU convention). Exception: only when you need bubbling.
Examples
export default Controller.extend({
actions: {
detonate() {
alert('Kabooom');
},
},
});
Examples of incorrect code for this rule:
{{awful-component detonate='detonate'}}
// awful-component.js
export default Component.extend({
actions: {
pushLever() {
this.sendAction('detonate');
},
},
});
Examples of correct code for this rule:
{{pretty-component boom=(action 'detonate')}}
// pretty-component.js
export default Component.extend({
actions: {
pushLever() {
this.boom();
},
},
});
References
- RFC to deprecate
sendAction