alfonsogarciacaro / fable-vue

Fable bindings for Vue.js
35 stars 2 forks source link

Nice API Support for Async components #5

Open Zaid-Ajaj opened 6 years ago

Zaid-Ajaj commented 6 years ago

like Handling Loading State


const AsyncComponent = () => ({  
// The component to load (should be a Promise)  
component: import('./MyComponent.vue'), 
 // A component to use while the async component is loading  
loading: LoadingComponent,  
// A component to use if the load fails  
error: ErrorComponent,  
// Delay before showing the loading component. Default: 200ms.  
delay: 200,  
// The error component will be displayed if a timeout is  
// provided and exceeded. Default: Infinity.  
timeout: 3000
})
--