mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
e9a77d8619
* wip: fix nested islands
* fix: improve hydration for dynamic content
* chore: fix bundle-size script for new files
* chore: allow-list client:* directive files
* fix(#3362): fix client:only behavior for React, Vue, Solid
* test: add client-only e2e test
* chore: update lockfile
* test: fix e2e tests
* test: add framework nesting e2e tests
* Update packages/astro/src/runtime/client/events.ts
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* chore: add changeset
* fix(preact): ignore hydrate roots
* chore: remove `ssr` check in integrations
* Revert "chore: remove `ssr` check in integrations"
This reverts commit ba27eaae55
.
* chore: add changeset
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
10 lines
299 B
JavaScript
10 lines
299 B
JavaScript
import { h, render } from 'preact';
|
|
import StaticHtml from './static-html.js';
|
|
|
|
export default (element) => (Component, props, children) => {
|
|
if (!element.hasAttribute('ssr')) return;
|
|
render(
|
|
h(Component, props, children != null ? h(StaticHtml, { value: children }) : children),
|
|
element
|
|
);
|
|
}
|