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