You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
count is a primitive value, without any further added logic, the destructuring will cause it to be read (and thus copied) once and never change.
There is no good way for Svelte to know that it needs to add that extra logic here to keep updating the value.
Treating everything as potentially changing could cause other issues and adds overhead in computational cost and bundle sizes.
Describe the bug
Using destructuring assignment when
$state
rune is returned in a getter.The above result in different behaviour in template and
$effect
as well.Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE32R0U7DMAxFf8WKkLaJqoPXsiGh8c4HMB5G5o6M1qkSF4Gq_DtOunaMTXuKYvueOPd2qjQVelW8doo2NapCPTWNyhT_NPHiv7BilLu3rdOxsvDamYYf17RmUzfWMXSgHW4YV7YlRgcBSmdrmORz3VfyHpPv_eRBdKLUljzDoQ3LU8B0Fqe4woSOtQwMyUiNxEK_PL6mxfy4Gz2jZ9dqbh1uC5Dme8tsCSzpyujPZTcSQ_rLKlY9dOm9EGG9IMEWH07OF2d2hjZVcYE2_PQaVdpndLG2tltTGtyqQhbGkI1JnLp3DGXv_waC3ymEsiXNRlb65w10g5cJJ-bdeJaB6d3skMWoHHcfVDGnqLldwn3yOPQKh2IrDTO7gX2UjSOp3sfDIevP8ZlElGY4N-Et_ALR2HogmgIAAA==
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: