Skip to content

Refactor and implement pull based service #281

Description

@snewcomer

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions