-
-
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
slot let:name value changes not propagating through inner slots #3472
Comments
Ran into this just now: https://svelte.dev/repl/849b5e9c4c4c4ed39c5177ec0089088d?version=3.14.1 |
I've also ran into the same issue. Initially thought it might have something to do with nested store subscriptions, but the same is present just when passing local reactive variables down through components: https://svelte.dev/repl/b7d4de8f20634d47a42fd621b689938b?version=3.15.0 |
@Conduitry did this get fixed with #4091? Seems to be the case on my end. |
Yep, thanks, looks like #4061 was a duplicate of this, and it's fixed now. Closing. |
Seems like the fix has only solved the issue when the nesting/component hierarchy is 1 level deep (see REPL for example). In this example you would expect all This is probably an extreme example, but you would expect this to work within slotted components. You can see the effect of this by comparing the above REPL and this edited version that has an empty component that renders a Not familiar with the svelte source in the slightest, but will dig into the PR that addressed this issue and see if there is anything obvious! |
When using the slot:let directive to receive a value, changes to that value are not reactive inside nested slots.
e.g.
<Outer let:count={count}> <Inner> Inner Count = {count} </Inner> Outer Count = {count} </Outer>
When
count
changes, only the "Outer Count" text is updated.https://svelte.dev/repl/63d04893dec14580a141d4d639021a21?version=3.9.1
I would expect that both "Outer Count" and "Inner Count" text would be updated.
May be related to #3364
I don't know the inner workings well enough yet to be sure.
Tested in
Severity would seem relatively high as I'm not sure how you would easily correct the behavior.
Thanks for the amazing work. Svelte is awesome!
The text was updated successfully, but these errors were encountered: