-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Problem with reflect prop on web components. #8879
Comments
Could you be more specific? If I'm changing a prop from the outside that is reflected. What I'm seing though that when I'm changing a prop from inside the component the prop is on then that's not reflected - is that's what you mean? |
Sorry for the unclarity. I meant when I changed the prop from the actual consumer of the web component output. I.e: <custom-button size="WHEN I CHANGE THIS VALUE" /> |
I tested with the updated svelte version svelte@4.0.3. Now it works. Thanks for the fast response and update ❤️! |
Describe the bug
I'm creating a web component library with svelte components. I use esbuild(^0.17.12) with svelte-preprocess(^5.0.4) with the
customElement
option.I previously wrapped all my components and manually declared them to the browser without using
customElements
.customElements.define( name, constructor, options );
But I thought I would give it a shot with the new svelte 4 update.
But I'm having problems with updating the props with the new setup.
This is how I declare the props for the components:
I use the reflect prop. BUT when I change any given prop in the application that consumes the component nothing changes. Any ideas why?
Reproduction
See the code in the description.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: