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
Similar to #3518, I don't see any reason why lwc:ref elements shouldn't be statically optimizable. We'd just have to pass in the ref to the VStatic vnode and set it when rendering.
The text was updated successfully, but these errors were encountered:
nolanlawson
changed the title
Apply static vnode optimization to elements with lwc:ref
Apply static vnode optimization to elements with directives
May 23, 2023
I looked into it (#3550) and decided to do it for lwc:ref but not the others (for now). My reasoning:
lwc:inner-html seems doable, but low-value – the value of lwc:inner-html will usually be dynamic rather than static anyway
lwc:external does not use the typical h (HTML) API in api.ts that you might expect, so it seems complex to apply static optimizations to it right now (and also low-value since there aren't a lot of these today)
lwc:dom is the most promising, but synthetic shadow is deprecated, and plus it ended up being tricky to get synthetic shadow scoping / portals to work properly. I have working code (30b8eef), but it adds a lot of complexity and just doesn't seem very worth it.
Similar to #3518, I don't see any reason why
lwc:ref
elements shouldn't be statically optimizable. We'd just have to pass in theref
to theVStatic
vnode and set it when rendering.The text was updated successfully, but these errors were encountered: