-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Description
Describe the bug
Before 5.36.0, when switching two components, the initialization of the new component executed after the onDestroy
callback of the old component.
Since 5.36.0, the initialization of the new component runs before the onDestroy
callback of the old component. See the console output of the REPL.
This is unexpected. Why was it changed? If it is intended, could it be, please, documented in https://svelte.dev/docs/svelte/lifecycle-hooks?
This issue may be just a simpler reproduction of #16618.
Reproduction
https://svelte.dev/playground/82d317baba1e4ef19cb44e79bbef836e?version=5.38.9
Logs
System Info
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics
Memory: 18.69 GB / 30.12 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: 4.9.1 - ~/.nvm/versions/node/v20.12.2/bin/yarn
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
bun: 1.2.16 - ~/Projekty/Planner/designer/node_modules/.bin/bun
Browsers:
Chrome: 140.0.7339.127
npmPackages:
svelte: ^5.37.2 => 5.37.2
Severity
annoyance
Duckapple and thes01
Metadata
Metadata
Assignees
Labels
No labels