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
I'm trying to use a key block to rerender a component based on a condition, but I noticed that if a component is nested it looks like it doesn't actually get re-rendered
https://svelte.dev/repl/990bc381eae748a2822c3d07304d14c2?version=3.46.5
the behaviour I'm expecting is to get Component3 to log 'mount' when reset changes
No response
System: OS: macOS 12.3 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 16.49 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - /usr/local/bin/node npm: 8.3.1 - /usr/local/bin/npm Browsers: Chrome: 100.0.4896.60 Firefox: 98.0.2 Safari: 15.4
annoyance
The text was updated successfully, but these errors were encountered:
@alextana Interestingly, if you pass the key into the nested component as a prop, it works as you expect it to: https://svelte.dev/repl/28bfa9addc014a8586ea88a03ed1e80e?version=3.46.5
key
Sorry, something went wrong.
Yeah, that's interesting and it works well enough for me to close this, thanks a lot @kindoflew :)
even if it's possible when it's passed as prop, can we let this open, so we can fix original issue in compiler?
fair point, I'll reopen
Successfully merging a pull request may close this issue.
Describe the bug
I'm trying to use a key block to rerender a component based on a condition, but I noticed that if a component is nested it looks like it doesn't actually get re-rendered
Reproduction
https://svelte.dev/repl/990bc381eae748a2822c3d07304d14c2?version=3.46.5
the behaviour I'm expecting is to get Component3 to log 'mount' when reset changes
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: