Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created September 13, 2018 22:08
Show Gist options
  • Save alexdiliberto/4e80f49ebf60ef4f5c69f948a36d193c to your computer and use it in GitHub Desktop.
Save alexdiliberto/4e80f49ebf60ef4f5c69f948a36d193c to your computer and use it in GitHub Desktop.
Observers are immediately invoked inline-functions
// observers are immediately invoked inline-functions
function updateState(newValue) {
this.isUpdating = true;
this.set('foo', newValue);
// all observers on `foo` will fire before we hit this line
this.isUpdating = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment