Skip to content

Instantly share code, notes, and snippets.

View adamlogic's full-sized avatar

Adam McCrea adamlogic

View GitHub Profile
@adamlogic
adamlogic / components.foo-bar.js
Last active February 14, 2020 15:05 — forked from givanse/components.foo-bar.js
Ember runloop demonstration with a computed property and an observer
import Ember from 'ember';
export default Ember.Component.extend({
sourceInternal: 'default',
logs: [],
source: Ember.computed('sourceInternal', {
get: function() {
this._log(`[source getter] sourceInternal=${this.get('sourceInternal')}`);
return this.get('sourceInternal');