Say you have a component with three actions that have no internal functionality. It seems pretty redundant to have to specify an action hash on the component like so:
actions: {
actionOne: function () {
this.sendAction('actionOne');
},
actionTwo: function () {
this.sendAction('actionTwo');
},
actionThree: function () {
this.sendAction('actionThree');
}
}
Is there a reason this.sendAction(<actionName>)
can’t be the default for any action in a component that doesn’t specify a custom handler?
See: http://emberjs.jsbin.com/fudequta/2/edit
Also, reference: https://github.com/emberjs/ember.js/issues/5209
In response to @tomdale with respect to adding more implicit data flow, I don’t think this use case adds any additional implicitness. This behavior is already essentially present in Ember.View, and to my mind, it doesn’t affect the encapsulation of Ember.Component.