0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/.changeset/blue-bobcats-remain.md

22 lines
466 B
Markdown
Raw Normal View History

---
"@astrojs/preact": minor
---
Allows rendering lazy components.
You can now use [lazy components](https://preactjs.com/guide/v10/switching-to-preact/#suspense-experimental) with Suspense:
``` jsx
import { lazy, Suspense } from 'preact/compat';
const HeavyComponent= lazy(() => import('./HeavyComponent'));
const Component = () => {
return (
<Suspense fallback={<p>Loading...</p>}>
<HeavyComponent foo="bar" />
</Suspense>
);
};
```