-
-
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
fix: svelte:component evaluates props once #8946
fix: svelte:component evaluates props once #8946
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Could you add a changeset? Then we're good to merge.
I think this change results in reactive props not being picked up by the component (See here). Is this the new expected behavior? |
@dorisip I looked into your repro and noticed a weird thing, |
I'm having the same issue, this breaks my project, reactive props { ...props } do not change for components in |
My investigation shows that, the bug actually originates from the implementation of Current impl of const switch_instance_spread_levels = [/*props*/ ctx[1]];
var switch_value = /*view*/ ctx[0];
function switch_props(ctx) {
let switch_instance_props = {};
for (let i = 0; i < switch_instance_spread_levels.length; i += 1) {
switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]);
}
return {
props: switch_instance_props,
$$inline: true
};
} I tried to backtrace history of |
Fixes #6634
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint