Skip to content

Instantly share code, notes, and snippets.

View vfuto's full-sized avatar
🏃
deploy&run

Viktor Futo vfuto

🏃
deploy&run
View GitHub Profile
import Controller from '@ember/controller';
import { action, computed, set } from '@ember/object';
export default class ApplicationController extends Controller {
get nonComputedMessage() {
return this.model.message;
}
@computed('model.message')
get computedMessage() {
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
import { restartableTask } from 'ember-concurrency';
export default class ApplicationController extends Controller {
@tracked appName = 'Ember Twiddle';
@restartableTask
*testTask() {
this.appName = 'testing';
@vfuto
vfuto / components.test-component\.js
Last active March 19, 2021 15:19
tracked vs computed
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { computed } from '@ember/object';
export default class extends Component {
@tracked sortBy = "test";
incredibleArray = [];
get currentSortBy() {