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
Due to how render updates are currently batched (#9768) that is not a valid test of reactivity being triggered (in case that was the point here).
If you use an $effect to test for that, only the state signals:
Due to how render updates are currently batched (#9768) that is not a valid test of reactivity being triggered (in case that was the point here). If you use an $effect to test for that, only the state signals:
I get that. I just found it interesting that in the example @Rich-Harris posted, object.count is not reactive but using it within $state then referencing the original object has the proxied version it is.
I guess I thought $state would deep copy a POJO's scalar/supported values and not mutate.
Describe the bug
As of #9739, props are readonly (unless used with
bind:
). By extension, default values should also be readonly (enforced at dev time).At present, that doesn't happen — default values can be mutated, but it's not reflected anywhere
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE42P0WrDMAxFf0WYQVNWkvXVrQNjn7HsYXWczZ1jGVsZDON_n-1AKbQPRS--8tXRVWSTNiow_h6Z_ZwV4-zVObZj9OeKCL_KkMo64OJl6RyD9NpRP1gAPTv0BG_f2owweZxh03ZVtevg5jDYY3eZyGL1dn1GzjjqSauRcfKLSrtLgup5LMNARhFEwNNZSQKRnxIXSxxeIOUS8OQ8utBsb5KcFiK0gFYaLX9EbLYgeoiFudLaSoJnAftD6Uq0AY1qDX41146CTqmGqajAIV7_p7J53Xbn7I_0D3kxjdKEAQAA
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: