-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Describe the bug
I'm not sure... is this by design or not?
My example: LINK
I have a component, where I modify a received property.
One time it's directly inside component.
and another time it's inside snipped (which is also used in Component)
It has basically the same onclick - It will modify received data inside Component.
But only gray button produce a warning (missing ownership_invalid_mutation).
This do not happen, if I click snipped button (colored).
As I understand, we should not mutate received data.
Instead, we should use callback functions.
Right?
But... wow, I wish, we could officialy use such code... how beautiful is that to avoid callbacks?
We need clarity here... Perhaps quick response.
Otherwise, I don't know how to write right code now...
same code, but with callbacks:
LINK
Reproduction
see above
Logs
No response
System Info
Svelte 5.1.9
Severity
annoyance