Skip to content

Svelte 5: store updates trigger component prop changes that didn't with 4 #11448

Description

@CaptainCodeman

Describe the bug

Setting a component prop to a store value causes the component prop to see a change with 5 when it didn't with 4.

i.e. it appeared to be deduped with 4 but isn't with 5

Reproduction

Svelte 4: https://svelte.dev/repl/d43370affcf9403b9a5566a9e9849da8?version=4.2.15

Toggle triggers a change in the component, Update doesn't (prop value stays the same).

Svelte 5: https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE41SQW6DMBD8ytaKFJAQ3BEgVflCeyo9ELJEVo3XwkuayvLfK-yIpEkPOa09npkd7dqJQSq0ovxwQncjilK8GiMywT9mudgTKkaRCUvz1C9IZftJGm5a3bIcDU0MDr4nyd1eIXgYJhphG3WFZZpwe0Pd0WhIo-YLLy9WJI-aha1b7klbhqCHevVPHJw6NWMJQ6csgk8je5h1z5I0MB2PCpMU3AK3HAzy2Rw6xuQMdQNXi5dzHk7g08WG_Z3XRfWU16NVVVwHpav9zEwaSJe9kv1X7WJQ37yFWhWR0PxHjR198x7qDbXVbhNDheYhf3WdcADrvxQoGpGJkQ5ykHgQJU8z-mzd_Sp-9gfgOaxV4aVdHOGmhGV_pDBXdEzCS3o3EhcDPab59L-vjIN4lQIAAA==

Update now triggers a change of the prop value, even though the value hasn't actually changed (see console log)

Logs

.

System Info

System:
    OS: macOS 14.4.1
    CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
    Memory: 1.83 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.0.0 - ~/Library/pnpm/node
    npm: 10.5.1 - ~/Library/pnpm/npm
    pnpm: 9.0.6 - ~/Library/pnpm/pnpm
    bun: 1.0.0 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 123.1.64.113
    Chrome: 124.0.6367.119
    Chrome Canary: 126.0.6456.0
    Safari: 17.4.1
    Safari Technology Preview: 17.4
  npmPackages:
    svelte: ^5.0.0-next.123 => 5.0.0-next.123

Severity

blocking an upgrade

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions