6 lines
350 B
JavaScript
6 lines
350 B
JavaScript
|
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 }, createElement(StaticHtml, { value: children, suppressHydrationWarning: true })), element);
|