-
Notifications
You must be signed in to change notification settings - Fork 8
Store
bredele edited this page Feb 11, 2014
·
8 revisions
The Store component is the model layer of your application. It's basically a wrapper for your models and collections that contains your data and all the logic surrounding it such as formatters, access control, computed properties, reset, local storage and can be easily extended with its middleware engine.
var Store = require('maple/store');
var model = new Store({
name: 'olivier'
});
var collection = new Store([{
name: 'olivier'
}, {
name: 'amy'
}
]);Store is really simple and reduces the complexity of your application, see article.
Store inherits from [Emitter]() and allows you to listen changes in your data.