Skip to content
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 not reactive when using $$props (regression) #3364

Closed
halfnelson opened this issue Aug 7, 2019 · 2 comments · Fixed by #5125
Closed

Slot not reactive when using $$props (regression) #3364

halfnelson opened this issue Aug 7, 2019 · 2 comments · Fixed by #5125
Labels

Comments

@halfnelson
Copy link
Contributor

Describe the bug
changes in $$props no longer causes a slot to re-render even if the slot has properties that derive from $$props.

To Reproduce
Simple reflection of props fails in 3.7.1
https://svelte.dev/repl/43683d712ec940d7adbddb358106b0ee?version=3.7.1

Expected behavior
when you click the button the text should change from "hi" to "changed" like it does in 3.6.1
https://svelte.dev/repl/43683d712ec940d7adbddb358106b0ee?version=3.6.1

I think this was caused by same refactor as #3354
in that $$props is not seen as dynamic (it is added the dynamic attributes, but skipped when considering the slot redraw)

Severity
I have worked around it by introducing a reactive variable like:
$: p = $$props and referencing that in the slot
e.g. https://svelte.dev/repl/83a137e2188c430884d19ccfb311b14d?version=3.7.1

halfnelson added a commit to halfnelson/svelte-native that referenced this issue Aug 7, 2019
@Conduitry Conduitry added the bug label Aug 7, 2019
@StephenStrickland
Copy link

Reproducible issue persists in v3.16.4: https://svelte.dev/repl/43683d712ec940d7adbddb358106b0ee?version=3.16.4

@Conduitry
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants