Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Which hook in components is best practise for teardown?

$
0
0

@sukima wrote:

All the previous topics seem out of date and inaccurate resurrecting topic.

In a component where do we tear down Dom events / jQuery listeners? willDestroyElement or willDestroy ?

  • Glimmer components do not have a willDestroyElement hook.
  • API docs say willDestroy is for teardown and leave willDestroyElement vague and unhelpful.
  • Guides specifically call out willDestroyElement and do not offer willDestroy as a lifecycle hook.

Trying to settle a debate at work. Thankx

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles