Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Resolve deprecation by not using didInsertElement #23

Closed
wants to merge 1 commit into from

Conversation

djsegal
Copy link

@djsegal djsegal commented Jul 8, 2016

Removed deprecation warning by combining logic from:


error was approximately:

DEPRECATION: A property of <Ember.OutletView:ember1021> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation.

@Suven
Copy link
Collaborator

Suven commented Jul 8, 2016

I like that approach very much.

Currently I am little busy with other projects, but I will try to merge open PR's as soon as possible.

Thanks for your contributions!

@abercrave
Copy link
Contributor

abercrave commented Jul 8, 2016

Thanks for picking this back up! I've allowed myself to get sidetracked.

My only real concern with this approach is related to this: ember-fastboot/ember-cli-fastboot#207.

Apparently afterRender queues will always be executed, so I think we will also need to add a window check in order for this to be Fastboot-compatible.

ember-in-viewport has a great example of a such a check in its canUseDOM util.

I have updated #21 to demonstrate this idea.

@djsegal
Copy link
Author

djsegal commented Jul 10, 2016

@abercrave

  • can we just use this as a temporary workaround?
  • then do the accepted solution when the next deprecation warning comes around

@abercrave
Copy link
Contributor

@djsegal:

I've realized I was over-thinking my solution. Using didInsertElement in conjunction with afterRender passes the tests, removes the deprecation warning, and maintains the initial goal of making the addon Fastboot-compatible. I've updated #21 once again to demonstrate. Let me know what you think.

@djsegal
Copy link
Author

djsegal commented Aug 11, 2016

Closing this because @abercrave's solution should be the one that gets merged in.

@djsegal djsegal closed this Aug 11, 2016
tszymon pushed a commit to tszymon/ember-cli-swiper that referenced this pull request Aug 11, 2023
…_yarn/xmldom/xmldom-0.7.11

Bump @xmldom/xmldom from 0.7.5 to 0.7.11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants