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
Continuing issues #2281. When rendering a list of nested components (A, B, C) and calling beforeUpdate, onMount, afterUpdate in each of them, all beforeUpdate calls occur first and in reverse order (I think this is unintuitive). Calls onMount and afterUpdate are predictable.
This would be a breaking change to modify now, but I think from my point of view at least it makes sense. My reasoning is that beforeUpdate isn't part of the render lifecycle, and is called after the component is loaded, but before any state exists/changes. onMount is then called as the components mount in the DOM, and then afterUpdate is called because the state is modified as part of the component's mount sequence.
I think it's one of those things that would benefit from documentation, but is probably working in the intended way.
Continuing issues #2281. When rendering a list of nested components (A, B, C) and calling beforeUpdate, onMount, afterUpdate in each of them, all beforeUpdate calls occur first and in reverse order (I think this is unintuitive). Calls onMount and afterUpdate are predictable.
Here's a repro: https://svelte.dev/repl/0e2b1e068bb9431fa9f5e2827b552ff3?version=3.6.4
The text was updated successfully, but these errors were encountered: