We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<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.
basic-markup
REPL
.
annoyance
The text was updated successfully, but these errors were encountered:
I think it is pretty intuitive but I'm not opposed to add a section to the docs
Sorry, something went wrong.
In vanilla HTML, the ordering does not matter. So it can be a hidden gotcha.
In vanilla JS, the ordering does matter. So it isn't so hidden.
let obj = { foo: 42 }; let a = { foo: 123, ...obj, }; let b = { ...obj, foo: 123, };
a and b will have different values in foo and the same applies to props. But, yeah, there is nothing bad in reminding it in the docs and/or tutorial.
a
b
foo
No branches or pull requests
Describe the bug
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
REPL
Logs
System Info
.
Severity
annoyance
The text was updated successfully, but these errors were encountered: