sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
78.68k stars 4.12k forks source link

Svelte 5: Non-reactive behaviour for `bind:value` with wrapped components in next.222 #12860

Closed marianmeres closed 1 month ago

marianmeres commented 1 month ago

Describe the bug

After upgrading to next.222 I'm seeing this. Downgrade to next.221 works.

// this works
<input bind:value={$value1} />

// this worked in `next.221` but stopped in `next.222`
<Field bind:value={$value2} />

Reproduction

svelte 5 preview REPL - value bbb never updates

Logs

No response

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M2
    Memory: 967.73 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.8.1 - /opt/homebrew/bin/npm
    pnpm: 9.1.4 - /opt/homebrew/bin/pnpm
  Browsers:
    Brave Browser: 127.1.68.137
    Chrome: 126.0.6478.127
    Edge: 122.0.2365.63
    Safari: 17.6
  npmPackages:
    svelte: 5.0.0-next.222 => 5.0.0-next.222

Severity

blocking an upgrade

trueadm commented 1 month ago

This is a recent regression from https://github.com/sveltejs/svelte/pull/12843?

alex-pirogov commented 1 month ago

also encountered this issue works correctly in runes mode though: let {value = $bindable()} = $props()