Skip to content

Svelte 5: binding_property_non_reactive when binding to a writable store #13825

@WaltzingPenguin

Description

@WaltzingPenguin

Describe the bug

const store = writable({ count: 0 })
let rune = $state({ count: 0 })
<Child bind:form={$store} />
<Child bind:form={rune} />

I would expect the binding to both the store and rune to operate the same in this scenario. It does not however. If <Child /> contains <input type="number" bind:value={form.count} />, the version passing a writable store will warn "binding_property_non_reactive" and changes will not trigger UI changes.

Reproduction

https://svelte.dev/playground/4341cc700cfa4fb6b7795d4ae65a3051?version=5.0.5

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF
    Memory: 45.21 GB / 63.85 GB
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.11.0 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    svelte: ^5.0.5 => 5.0.5

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions