henrykrinkle01
henrykrinkle01
That only masks the problem. It doesn't change the fact that `$form.foo` also gets reassigned whenever `bar` or any other properties change.
Right, but that only works if you reassign `likesCheeseburgers` as a whole, which makes sense if it's a primitive like `boolean`. If it's an object and we want to mutate...
> Most of the time - and the way the APIs work push you in that direction - it's better to not mutate, instead reassign the data. In other words,...
I can't think of anything this change would 'break', but perhaps I'm ignorant. I think this is more an enhancement rather than a breaking change. Like moving from read-only `$derived`...
If you're talking about `page.data` then right. However currently nobody is actually doing `page.data` mutation, at least without a hacky workaround. If `data` is a fully proxified `$state` and you...
So it seems the least invasive solution is proxifying `data` in a `$derived`. It would've been nice if this syntax was allowed as an alternative to the current `$state` in...
It's both. There've been related issues opened in both branches. There are cases where this problem can arise in Svelte alone, but mostly it's related to the `data` prop, which...
It works as intended ```js let currentUserReview = $derived(applicantDetailsData.evaluation[data.session.user.id]); ``` When you write to `currentUserReview`, you don't update `applicantDetailsData.evaluation[data.session.user.id]` directly but just a cloned version of it.
Edit: added stackblitz repl. This problem is actually more annoying than just a false positive. It causes flash and layout shift.
YES. There must have been hundreds of Discord questions and Github issues related to this. To avoid the parent mutation problem, currently I'm doing it like this: ```js let local_arr...