blob: 12c5666df17f7ed1d543e279605c4706ccbb1d5c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
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
);
};
|