Skip to content

Instantly share code, notes, and snippets.

@adamrneary
Last active August 29, 2015 14:27
Show Gist options
  • Save adamrneary/5346605c481ffaf98e21 to your computer and use it in GitHub Desktop.
Save adamrneary/5346605c481ffaf98e21 to your computer and use it in GitHub Desktop.
module.exports = function(model) {
const entity = model.entity;
let apiActions = {};
// This method can be used in situations where a model's data is fetched via
// a separate request, and we just want to process the resulting data
apiActions.receiveAll = function(result) {
Flux.dispatch(actionTypes.API_FETCH_SUCCESS, {
model: model,
result: result,
});
return result;
};
// and so on…
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment