A generic view that has state
and props
.
Install with component(1):
$ component install ripplejs/view
var view = require('view');
// Creates a new view class
var View = view();
// Set state of the view
var myThing = new View({
user: model
});
myThing.props.user // model
myThing.state.set('selected', true);
MIT