-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ondestroy
vs .teardown()
and .on('teardown', ...)
#365
Comments
ondestroy
vs .teardown()
and .on('teardown', ...)
Yeah, at the moment I propose the following: For
|
Hmm, |
Pushed a WIP-but-should-pretty-much-work mechanism for having alternate dev versions of shared helper functions to the dev-helpers branch. There's a new devHelperLookup object (currently empty) that maps helper names to the names of their dev versions (which will also have to be exported from shared.js). Also tidied up a couple of other things related to helper function references. I'd be interested to hear whether you think this is the right track or not. |
As a side node, I'd move the deprecation logic into a separate file, so you could maintain the formatting logic in one place. I suggest an API like |
Fixed in 1.11.4. Adding centralised deprecation logic is a little tricker in the context of Svelte, because sometimes it's a compile-time deprecation, sometimes runtime, etc. For now my position is YAGNI, but if we end up deprecating other stuff then it warrants revisiting |
This might be weird functionality but it may just be a vague docs issue (or a me issue!).
So, recently the
onteardown
hook was renamed toondestroy
but there are still the.teardown()
method on components and the.on('teardown', ...)
event that that emits. Is the idea that theteardown
event is only emitted when a component is manually torn down, or that it would be emitted any time a component is destroyed?Are there any other events besides
teardown
that are automatically emitted? Should.teardown()
and.on('teardown', ...)
be renamed to match theonteardown
->ondestroy
hook change?The text was updated successfully, but these errors were encountered: