Skip to content

Instantly share code, notes, and snippets.

@samueljseay
Created February 18, 2015 03:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueljseay/5adc902e5ab6eec09370 to your computer and use it in GitHub Desktop.
Save samueljseay/5adc902e5ab6eec09370 to your computer and use it in GitHub Desktop.
// Don't do this
var RecentProblemsComponent = Y.Base.create('prb-recent-problems-component', Y.View, [Y.OHP.Component], {
initializer: function() {
this.goGetData().then(this.renderAThing);
},
renderAThing: function() {
//render part of my UI
this.nowFetchSomeOtherDataPls().then(this.renderOtherThings);
},
nowFetchSomeOtherDataPls: function() {
//render a second part of my UI
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment