blob: 11d63cfcba7b1f4204bcae61efbc04b2970dfa6f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { createElement } from 'react';
import { hydrateRoot } from 'react-dom/client';
import StaticHtml from './static-html.js';
export default (element) => (Component, props, children) =>
hydrateRoot(
element,
createElement(
Component,
{ ...props, suppressHydrationWarning: true },
children != null ? createElement(StaticHtml, { value: children, suppressHydrationWarning: true }) : children
)
);
|