ember-lifeline icon indicating copy to clipboard operation
ember-lifeline copied to clipboard

Documentation and code do not agree on runDisposables

Open SanderKnauff opened this issue 5 years ago • 5 comments

According to the code, runDisposables is deprecated and is not required anymore. This clashes with the documentation where it strongly recommends to use the method. I assume that the documentation needs updating to reflect the new situation in the code.

SanderKnauff avatar Apr 12 '21 09:04 SanderKnauff

I assume that the documentation needs updating to reflect the new situation in the code.

Yep! We missed updating that when we removed that requirement.

rwjblue avatar Apr 12 '21 17:04 rwjblue

Does the docs site need updating/regenerating somehow with recent changes (as per #978)?

https://ember-lifeline.github.io/ember-lifeline/versions/master/ currently crashes and I'm not sure where else in the project to look.

Screenshot 2022-03-07 at 20 05 25

nruth avatar Mar 07 '22 20:03 nruth

https://ember-lifeline.github.io/ember-lifeline/docs

Still incorrectly(?) says to use runDisposables()

--- from website:

Using ember-lifeline's equivalent, in this case runTask, can help ensure that any active async is cleaned up once the object is destroyed.

import Component from '@ember/component';
import { runTask, runDisposables } from 'ember-lifeline';

export default Component.extend({
  init() {
    this._super(...arguments);

    runTask(
      this,
      () => {
        this.set('date', new Date());
      },
      500
    );
  },

  willDestroy() {
    this._super(...arguments);

    runDisposables(this);
  },
});

BryanCrotaz avatar Mar 21 '22 16:03 BryanCrotaz

Yep, I haven't updated the docs site yet. I've been a bit busy. I'll try to get to it soon.

scalvert avatar Mar 22 '22 22:03 scalvert

Still appears to be incorrect in the readme

BryanCrotaz avatar Apr 12 '23 10:04 BryanCrotaz