There are currently some methods I'm using repeatedly related to retrieving data from an API and that I can see using frequently in the future. They should be pulled into an external module in public/src/lib
so that I can do something like the following:
var createAPIStore = require('create-api-store'); // `public/src/lib` has been added to the browserify search paths
var actions = require('./actions');
module.exports = createAPIStore('/api/items', {
init: function(){
this.listenTo(actions.reloadItems, this.reload);
this.listenTo(actions.deleteItem, this.delete);
this.listenTo(actions.addItem, this.add);
}
});