You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A child component with a built-in transition, using a store value for the transition condition will not be unmounted.
(This problem is even worse in svelt-kit. the "+page" instance will not be unmounted and duplicated endlessly)
Workaround:
Use custom transitions instead of built-in transitions.
A workaround is to add local to the transition such as <div transition:fade|local>
I've personally come across this problem many times and seen others report the same problem. Perhaps some kind of change would be good to prevent this.
Seems like Svelte has always had issues with transitions. I confirm I had this double onMount issue after a native Svelte goto method and was fixed adding local directive. Given that local directive has been a fix to multiple Svelte issues in the past related to transitions, maybe it should become the default behaviour of transitions. #6812
Describe the bug
A child component with a built-in transition, using a store value for the transition condition will not be unmounted.
(This problem is even worse in svelt-kit. the "+page" instance will not be unmounted and duplicated endlessly)
Workaround:
Use custom transitions instead of built-in transitions.
Screen.Recording.2022-11-07.at.12.35.03.AM.mp4
Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: