You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
});
The text was updated successfully, but these errors were encountered:
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:The text was updated successfully, but these errors were encountered: