0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00
astro/.changeset/blue-bobcats-remain.md
Alex Jet 0903ef9049
feat: add preact-ssr-prepass (#9524)
* feat: add preact-ssr-prepass

* added more info to changelog

* fix example in changelog

* fix changelog description

* fix tab in code of changelog

* Update .changeset/blue-bobcats-remain.md

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-04 11:01:08 +00:00

21 lines
466 B
Markdown

---
"@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>
);
};
```