/view

A base view that handles state and properties

Primary LanguageJavaScript

view

Build Status

A generic view that has state and props.

Installation

Install with component(1):

$ component install ripplejs/view

Example

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);

License

MIT