summaryrefslogtreecommitdiff
path: root/packages/renderers/react/client.js
blob: 8e5650f6b6e3fb25b7c0715d9311b2064d331b83 (plain) (blame)
1
2
3
4
5
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);