Skip to content

Read-only bindings require getter function, even though it should be irrelevantΒ #15549

@brunnerh

Description

@brunnerh

Describe the bug

E.g. you will need something like

<input bind:this={() => {}, input => { ... }} />

Maybe bind:this={null, input => { ... }} or some other flavor should be possible?

Reproduction

<script>
	let value = $state();
	$inspect(value);
</script>

<input value="test" bind:this={null, e => value = e.value} />

Playground

Logs

System Info

REPL

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions