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
<whatever is a valid attribute/prop name by the specs.
I see.
So at that point it thinks that those are attributes and passes them fo the component, but as they are not used, Svelte removes them, resulting in clean code?
Thanks for the clarification, wasn't sure what was happening.
So at that point it thinks that those are attributes and passes them fo the component, but as they are not used, Svelte removes them, resulting in clean code?
No. For components, prop is shorthand of prop={true}. For HTML elements, it is shorthand of attr="" unless it is a known boolean attribute.
Describe the bug
So I was following the tutorials on the website, and came across this issue.
This syntax doesn't create a warning and works:
Also tested on a local project a more basic attempt to reproduce, and this also works, even when it's unvalid.
Reproduction
Visit https://svelte.dev/tutorial/svelte/spread-props and try the solution on the report.
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: