Backbone View Component
$ component install timoxley/backbone-view
var BackboneView = require('backbone-view')
var DocumentRow = BackboneView.extend({
tagName: "li",
className: "document-row",
events: {
"click .icon": "open",
"click .button.edit": "openEditDialog",
"click .button.delete": "destroy"
},
render: function() {
...
}
});
See documentation for Backbone.View
Currently, this component depends on component/jquery, component/underscore and timoxley/backbone-events. In future I would like to phase out fat dependencies like these for more focussed components such as component/dom, component/inherit and component/emitter.