svelte-loadable icon indicating copy to clipboard operation
svelte-loadable copied to clipboard

Feature: Support for loading components by promise

Open duruer opened this issue 5 years ago • 0 comments

Hi, if you do like this

<Loadable loader="{import('./Test.svelte')}" delay="{delay}">
  <div slot="success" let:component>
    <svelte:component this="{component}" {...params} />
  </div>
</Loadable>

It won't load the component and will give error like; component.then is not a function Maybe you can detect is it a promise in loader and if it is, it can await it to load?

duruer avatar Dec 16 '20 20:12 duruer