CommentStore.__onDispatch = function(payload){ switch (payload.actionType) { case COMMENT_CONSTANTS.RECEIVE_COMMENTS: CommentStore.receiveComments(payload.data); this.__emitChange(); break; case COMMENT_CONSTANTS.RECEIVE_SINGLE_COMMENT: CommentStore.receiveSingleComment(payload.data); this.__emitChange(); break; case COMMENT_CONSTANTS.DELETE_COMMENT: CommentStore.deleteComment(payload.data); this.__emitChange(); } };