Currently, to migrate from computed (push based) to tracked (pull based) it requires something like tracked-built-ins.
An example of what a pure "pull" based (@tracked) setup might look like is as follows:
// services/media.js
import MediaService from 'ember-responsive/services/media';
import { TrackedArray } from 'tracked-built-ins';
export default class OurMediaService extends MediaService {
constructor() {
super(...arguments);
this.matches = new TrackedArray(this.matches);
}
}
I'd be happy to put together a PR to refactor this addon to more modern Ember paradigms!
Currently, to migrate from
computed(push based) totracked(pull based) it requires something like tracked-built-ins.An example of what a pure "pull" based (
@tracked) setup might look like is as follows:I'd be happy to put together a PR to refactor this addon to more modern Ember paradigms!