Closed
Description
Describe the bug
Not sure what is happening, but when I type something into the input, it makes the snippet disappear. It depends on the order of attributes on the <Child/>
. This seems to be an issue only when values
and getProps
are inside the class.
<script>
import Child from './Child.svelte';
class Store {
values = $state();
getProps() {
return { oninput: (e) => (this.values = e.currentTarget.value), value: this.values };
}
}
const store = new Store();
</script>
{#snippet label()}
I will disappear
{/snippet}
<p>
<Child {label} {...store.getProps()} />
</p>
<!-- Child.svelte -->
<script>
let { oninput, label } = $props();
</script>
<label>
{@render label()}
<input {oninput} />
</label>
Reproduction
Logs
No response
System Info
Svelte REPL 5.0.0-next.110
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels