Describe the bug
If you use bind:value on an input and access the input element (either using bind:this or some other method), and then set the value of the input using the element's reference like so...
<script>
let value = $state("");
let input = $state();
</script>
Hello, {value}!<br>
<input type="text" bind:value bind:this={input} />
<button onclick={()=>input.value = ""}>Clear value</button>
The value variable doesn't stay synchronized with the input's value.
Reproduction
REPL
Logs
No response
System Info
Severity
annoyance