Skip to content

Commit 82983fd

Browse files
committed
Merge branch 'legacy-component-props-each' of github.com:sveltejs/svelte into legacy-component-props-each
2 parents 3fd6221 + a247848 commit 82983fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/svelte/src/legacy/legacy-client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ class Svelte4Component {
7676
sources.set(key, s);
7777
return s;
7878
};
79-
// Using proxy state here isn't completely mirroring the Svelte 4 behavior, because mutations to a property
80-
// cause fine-grained updates to only the places where that property is used, and not the entire property.
81-
// Reactive statements and actions (the things where this matters) are handling this properly regardless, so it should be fine in practise.
79+
// Replicate coarse-grained props through a proxy that has a version source for
80+
// each property, which is increment on updates to the property itself. Do not
81+
// use our $state proxy because that one has fine-grained reactivity.
8282
const props = new Proxy(
8383
{ ...(options.props || {}), $$events: {} },
8484
{

0 commit comments

Comments
 (0)