Package Exports
- omi-suspense
- omi-suspense/dist/omi-suspense.es.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (omi-suspense) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
omi-suspense
Handling asynchronous dependencies.
Installation
npm i omi-suspenseUsage
<o-suspense
imports={[
import('./components/user-info'),
import('./components/user-profile'),
]}
data={async () => {
return await fetchUserProfile(router?.params.id as string)
}}
onDataLoaded={(event: CustomEvent) => {
userProfile.value = event.detail
}}
>
<div slot="pending">Loading user profile...</div>
<div slot="fallback">Sorry, we are unable to load the user profile at the moment. Please try again later.</div>
<user-info>
<user-profile></user-profile>
</user-info>
</o-suspense>License
MIT © OMI