This is the guts of preact-cli
's import X from 'async!./x'
feature, extracted into a standalone library.
It creates a wrapper component that, when rendered, lazy-loads your real component. While loading, any SSR'd DOM is preserved intact.
This is the API of React.lazy()
or preact-iso's lazy(), but it does not use Suspense.