Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting deprecation warning #92

Closed
adityaU opened this issue Sep 21, 2015 · 4 comments
Closed

getting deprecation warning #92

adityaU opened this issue Sep 21, 2015 · 4 comments

Comments

@adityaU
Copy link

adityaU commented Sep 21, 2015

A property of <frontend@view:-outlet::ember390> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation
Ember 2.0.0

@adityaU adityaU changed the title A property of <frontend@view:-outlet::ember390> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation getting deprecation warning Sep 21, 2015
@Ramblurr
Copy link

Wrapping the body of didInsertElement with a call to Ember.run.scheduleOnce fixed the deprecation warning for me:

  didInsertElement() {
    this._super(...arguments);
    Ember.run.scheduleOnce('afterRender', this, () => {
      this._setupScrollable();
      this.set('guid', Ember.guidFor(this));
      this._bindEvent('scroll');
      this._bindEvent('resize');
      this._loadMoreIfNeeded();
    });
  },

This probably isn't an ideal solution as it causes an additional render, but I'm not sure what the ideal solution looks like.

See the discussion here: emberjs/ember.js#11493

@hhff
Copy link
Collaborator

hhff commented Feb 23, 2016

Cool yeah thanks @Ramblurr - I'm planning to work on this as part of #134

@snewcomer
Copy link
Collaborator

snewcomer commented Apr 16, 2018

Closing for now. Feel free to open again if somebody notices a problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants