kaisermann / svelte-loadable

Dynamically load a svelte component
MIT License
320 stars 13 forks source link

Is this discontinued? #57

Open frederikhors opened 1 year ago

frederikhors commented 1 year ago

Is this discontinued?

kaisermann commented 1 year ago

Hey @frederikhors 👋, I don't actively maintain this package anymore but PRs are welcome 🙏

frederikhors commented 1 year ago

They suggested this alternative, what do you think?

https://github.com/sveltejs/kit/discussions/4493#discussioncomment-6370252

{#await import('./MyComponent.svelte')}
  Loading... 
{:then { default: component } }
  <svelte:component this={component} />
{:catch error} 
  Failed to load component
{/await}
kaisermann commented 1 year ago

That will work well enough for most cases, yeah. You would only need to abstract it a bit in case you want to do the import lazily, like in an if block or something. It all depends on what you need 😁