-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
<input
{...rest}
type="text"
/><input
type="text"
{...rest}
/>These do not produce the same results and I don't see it documented in https://svelte.dev/docs/svelte/basic-markup or https://svelte.dev/docs/svelte/$props#Rest-props
I'm propose adding it to basic-markup and that addresses both elements and components.
Reproduction
Logs
System Info
.Severity
annoyance
Activity
paoloricciuti commentedon Mar 14, 2025
I think it is pretty intuitive but I'm not opposed to add a section to the docs
sacrosanctic commentedon Mar 14, 2025
In vanilla HTML, the ordering does not matter. So it can be a hidden gotcha.
7nik commentedon Mar 15, 2025
In vanilla JS, the ordering does matter. So it isn't so hidden.
aandbwill have different values infooand the same applies to props.But, yeah, there is nothing bad in reminding it in the docs and/or tutorial.