-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rewrite on('didInsertElement') and on('willDestroyElement') to override and call super instead #11
Comments
Why? |
Those events have hooks, which is the new standard way of changing them. It prevents unexpected behavior, especially if you have multiple events, which you cannot do with the hooks. |
I've seen recommendations to migrate from hooks to events. O-o |
Maybe for actual browser events? Like |
Found a very old example: https://dockyard.com/blog/2014/04/28/dont-override-init But I've seen more recent ones with the same idea. I personally haven't seen any difference with the two approaches, unless I need to control the order, but I've never had a practical case of that. |
That post is kinda old 😸 and he even mentions using |
cc @fivetanley
The text was updated successfully, but these errors were encountered: