Skip to content

Instantly share code, notes, and snippets.

@hadijaveed
Last active October 19, 2016 01:01
Show Gist options
  • Save hadijaveed/ba047e50bb942e743ed956fca5b7e9b0 to your computer and use it in GitHub Desktop.
Save hadijaveed/ba047e50bb942e743ed956fca5b7e9b0 to your computer and use it in GitHub Desktop.
// updates the DOM as well
ReactiveHbs.set('counter', counter.get() + 1);
// Observer
ReactiveHbs.reactOnChange('counter', { debounce: 1000 }, (tpl) => {
console.log( 'counter have been changed ' );
console.log( 'value', tpl.get('counter') );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment