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
As you can see from the REPL, it seems that as soon as I bind the new view, the parent component gets recreated as well, resulting in an infinite loop.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered:
If you add import { current_component } from 'svelte/internal' and console.log(current_component) in onMount callback you will see that it is called for Test component. onMount is called for current_component, see https://github.com/sveltejs/svelte/blob/master/src/runtime/internal/lifecycle.ts
Why doing such tricky implementation with new Test, instead of using <svelte:component this={Test}></svelte:component>, if component should be dynamic?
Hi all,
To facilitate a Svelte router, I'm currently making a component that takes care of the lifecycle of it's child components.
https://svelte.dev/repl/0bd735145fd94540ac78b39eab3521aa?version=3.6.7
As you can see from the REPL, it seems that as soon as I bind the new view, the parent component gets recreated as well, resulting in an infinite loop.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered: