You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
As discussed with @johnjenkins on the Stencil Discord (https://discord.com/channels/520266681499779082/933029266562613309/1339564884375109744), it is useful to be able to override a component's lifecycle function even if it is not manually declared on some component in the project.
In this article, the author creates a custom decorator that calls a method when clicking outside of a component. This is useful, but it won't work if the componentDidLoad function is not declared somewhere in the project.
In this Gist, the author attempts to force the BUILD.connectedCallback attribute to be true to bypass this issue, but it doesn't work.
@johnjenkins seems to believe that this micro-optimisation is not useful so the simplest solution would be to remove it.
It could also be a flag that disables this optimisation so there is no change for those who don't need it.
Prerequisites
Describe the Feature Request
As discussed with @johnjenkins on the Stencil Discord (https://discord.com/channels/520266681499779082/933029266562613309/1339564884375109744), it is useful to be able to override a component's lifecycle function even if it is not manually declared on some component in the project.
In this article, the author creates a custom decorator that calls a method when clicking outside of a component. This is useful, but it won't work if the componentDidLoad function is not declared somewhere in the project.
In this Gist, the author attempts to force the BUILD.connectedCallback attribute to be true to bypass this issue, but it doesn't work.
Describe the Use Case
There are a lot of usecases. Here one: https://medium.com/stencil-tricks/stenciljs-creating-custom-decorators-d4d8e78c5717
I think that the fact that we cannot override those function is an unexpected behavior
Describe Preferred Solution
@johnjenkins seems to believe that this micro-optimisation is not useful so the simplest solution would be to remove it.
It could also be a flag that disables this optimisation so there is no change for those who don't need it.
Describe Alternatives
No response
Related Code
On this gist the author tries to bypass the problem by overriding the BUILD reference but it doesn't work https://github.com/jarrvis/stencil-click-outside/blob/master/src/index.ts
Additional Information
No response
The text was updated successfully, but these errors were encountered: