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
When navigating to one of my routes, there is a noticeable delay before the component is displayed. Does svelte-routing provide any event that would allow me to show and hide a progress bar (when the navigation starts and ends)?
On the same note, I think there should be some option that would allow for the component to be loaded only once, then toggled when the route changes, in order to avoid loading the whole component trees.
Cheers!
EDIT # 1
I guess the delay has to do with the fact that components are loaded synchronously, thus blocking the page if there is some processing. Am I right to think that the only solution is to lazy-load component with something like svelte-loadable?
EDIT # 2
Using svelte-loadable does not seem to help. It's pretty weird that my component loads quickly when loading the page initially. Only once it is loaded via svelte-routing, because a route has been activated ,is there a ~1 second delay before my component is shown.
The text was updated successfully, but these errors were encountered:
Do you have a minimal reproducible example that we could ideally clone and try out? There should not be any delay when navigating since the component code is already loaded by your browser and ready to be rendered straight away.
When navigating to one of my routes, there is a noticeable delay before the component is displayed. Does
svelte-routing
provide any event that would allow me to show and hide a progress bar (when the navigation starts and ends)?On the same note, I think there should be some option that would allow for the component to be loaded only once, then toggled when the route changes, in order to avoid loading the whole component trees.
Cheers!
EDIT # 1
I guess the delay has to do with the fact that components are loaded synchronously, thus blocking the page if there is some processing. Am I right to think that the only solution is to lazy-load component with something like
svelte-loadable
?EDIT # 2
Using
svelte-loadable
does not seem to help. It's pretty weird that my component loads quickly when loading the page initially. Only once it is loaded viasvelte-routing
, because a route has been activated ,is there a ~1 second delay before my component is shown.The text was updated successfully, but these errors were encountered: