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
The text was updated successfully, but these errors were encountered:
python273
changed the title
#key does not prevent $props() from changing if key is $derived
BUG Svelte 5: #key does not prevent $props() from changing if key is $derivedApr 6, 2025
Describe the bug
Session
gets updated value before destruction.Reproduction
If you click "Update" and look into console,
Sessions
logs updatedsessionId
inonDestroy
:https://svelte.dev/playground/hello-world?version=5.25.7#H4sIAAAAAAAAE3WRzU7DMBCEX8UyleKoVXJP00hIPcABcUCcCIcQb8Gqaxt7m7SK8u7YTegPtMcdz87ufu6oqjZAM_oAUmrSais5YcAFAo_pjK6EBEezt47i3gRfELw-dt0bk7gGJAbto3JwTa-1QlDoY2juaisMFqUSG6MtkhdwTmhFVlZvSJSkYz02R6WSgGRHFmTisEJgJf1uoaTxfHhxg_2RBwcHKxrgbEemJJpEwZOnx4G--Ngi-lla1VLU60XHYrIoSHfIj6KpgpYsw5A4aSq5hecVi-ek74tXw72cp0O_z-ru1rA_De99Oua_p3QnPQ3e1Hu9w4NA2CHN0G6hn90Aenn_JdR_b1fBljii7fyhS3Bo9Z70I-Aj1hIDvlp7q_IRB4BPFX4ltlJcb1iAV6If4PD8oIDZWG3caJgI5QzUyM6SZicwg-m4BhuBB3EI1xISqT9ZxAdHNCM3kkJPH__9US6a4my9PA3CJel3X1VCtkJxmq0q6aD_AcXJk9T1AgAA
Without
$derived
,onDestroy
logs the correct value (though$inspect
logs updated value):https://svelte.dev/playground/hello-world?version=5.25.7#H4sIAAAAAAAAE3WRQU-DMBiG_0pTlwCRwJ0xEpMd9GA8GE_igdEPbVba2n4bLoT_biu4Dd2OfXm_p_0eeiqrFmhG70EIRTplBCMhMI7AIhrThguwNHvtKR607_nA5dPUndaJ3YNAn20qC5fyWkkEiQ5Dc1sbrrEoJW-1MkiewVquJGmMakmQpNN5Gg5KKQCJHcMHRlZkYbFCCEv62UFJo2Up8_QIdYfNDtHxlKwFr7erPozIqiD9jBEEtxI6svagKNlXYgdPTRgtyTAUL5q5OE9HjmP2N1s4nMYHdwvmv8_uT3nqu6nruoZbGuELaYZmB0N8Rd5817nAf98uSixx0ti7hddg0agDGSaZR4Uleom1clXpED8KHiv8SEwlmWpDL7FEd4HF84W8bG2UtlNhwaXVUGN4RopPYsbS8RnhJN6HI1wJSIR6DwM2NoKYXCH5mSH6-2cZ3xdnz8tTH8xNv7lTxUXHJaNZUwkLwzc9rcZv4QIAAA==
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: