-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rerun reactive declarations if the reactive declared variable is mutated #5045
Conversation
a1c24dd
to
5d0f430
Compare
The test failure here looks to be legitimate. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@dummdidumm is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
I'm not sure how I feel about this change.
In general this looks like one of those general shortcomings / things we haven't quite thought through holistically for bindings. Personally I'd hold off from merging this and wait until Svelte 5 where we should have a deep conversation about the future direction of bindings. |
@dummdidumm yes you are right, i think we can hold off or even close this one for now. |
now that Svelte 5 is out, it seems like this PR can be closed since the reactivity model has changed |
You're right, closing this |
Fixes #2444
The demo in #2444 was fixed in v3.2.1 but broken again since v3.16.0
The test case added in #2694 didn't handle a particular case in the demo where there's another declaration that should be invalidated too:
after #2694 mutating
var_b
, would$$invalidate
var_b
&foo
.but because
foo
wasn't mutated anywhere,var_a
is marked asfixed_reactive_declarations
instead, and$$invalidate
foo
will not produce a newvar_a
.This fix is to mark
foo
as mutated ifvar_b
orvar_a
is mutated.Before submitting the PR, please make sure you do the following
npm run lint
!)Tests
npm test
oryarn test
)