memory-leak-examples icon indicating copy to clipboard operation
memory-leak-examples copied to clipboard

willDestroy should be willDestoryElement

Open Frozenfire92 opened this issue 7 years ago • 1 comments

I'm not sure if both will work, just noticed it was inconsistent with ember docs

https://guides.emberjs.com/v3.0.0/components/the-component-lifecycle/#toc_detaching-and-tearing-down-component-elements-with-code-willdestroyelement-code

Frozenfire92 avatar Mar 20 '18 13:03 Frozenfire92

Both are fine (as the tutorial here is definitely correct), but I believe willDestroyElement is now the preferred method. willDestroy is still a public method in the component API through v3.0. We can probably should update the tutorial to use willDestroyElement to keep it inline with the rest of the community best practices.

trentmwillis avatar Mar 20 '18 15:03 trentmwillis