addyosmani/todomvc — comment on commit bfff7df807d0e8668c5f16aceee9612a5c7139de
File: architecture-examples/extjs/js/view/CheckAllBox.js line 7
By sindresorhus:

What I'm getting at is, wouldn't it be better to extend `Ext.Button`, since then you would get the click event for free. Something like this seems to work:

```javascript
Ext.define('Todo.view.TaskCompleteButton' , {
extend: 'Ext.Button',
alias: 'widget.completeButton',
tpl: new Ext.XTemplate('{text}', {compiled: true}),
setText: function (text) {
this.update({text:text});
}
});
```