Create reactive views easily.
$ component install segmentio/view
var createView = require('view');
var template = require('./template.html');
var View = createView(template);
var view = new View(model);
view.el; // Element
view.reactive; // Reactive
view.model; // Model
view.find('.button'); // Element
view.findAll('.button'); // NodeList
view.emit; // component/emitter
view.on; // component/emitter
view.once; // component/emitter
view.off; // component/emitterReturns a new View constructor that uses the given template.
Optional fn will be bound to the construct event.
The signature of the View created. All optional.
The template of the view, useful for inheritance if you need to override it.
The view's element once it's domify'd.
MIT