defineCustomElement Does Not Reflect Attributes to Props Before Mounting Component #4789
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: custom elements
Version
3.2.20
Reproduction link
github.com
Steps to reproduce
What is expected?
I'd expect the attributes to be set as props ideally before the setup function runs, definitely before mounted.
What is actually happening?
It appears that the component is mounted without any attributes being reflected as props and we have to wait until an update after mounting before being able to access the props.
It's an issue to wait for the component to be updated before we are given props. This is particularly problematic since its not exposed to the component whether the prop will ever be set or if we need to do the work to handle the case where its not set by the end user.
For reference this also occurs when using the custom element in other frameworks such as react.
Note doing some work to mount a created app in the ConnectedCallback of a custom element avoids this issue, but I'd like to use the provided custom element functionality from vue instead of having to do this.
The text was updated successfully, but these errors were encountered: