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
Thought I'd report behavior that tripped me. It looks like component props behave differently when compiled with customElements settings than without. This happens when instantiating Svelte app directly. It also happens when using components as custom elements directly in page.
With customElements component's script part doesn't seem to evaluate props and instead uses the default value (or undefined if none is set). However, in the HTML part the prop has access to value given by parent.
Without customElements in the mix component's has prop's value set in script part as well.
Uh oh!
There was an error while loading. Please reload this page.
Thought I'd report behavior that tripped me. It looks like component props behave differently when compiled with customElements settings than without. This happens when instantiating Svelte app directly. It also happens when using components as custom elements directly in page.
With customElements component's script part doesn't seem to evaluate props and instead uses the default value (or undefined if none is set). However, in the HTML part the prop has access to value given by parent.
Without customElements in the mix component's has prop's value set in script part as well.
Here's a Gist that should repeat the issue:
https://gist.github.com/jussiarpalahti/99ec05a9dc26cda078bee0846a7a5fd0
I used project exported from REPL as basis for this.
The text was updated successfully, but these errors were encountered: