6386c14d00
* update examples * add initial integrations * update tests * update astro * update ci * get final tests working * update injectelement todo * update ben code review * respond to final code review feedback
13 lines
401 B
JavaScript
13 lines
401 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 },
|
|
children != null ? createElement(StaticHtml, { value: children, suppressHydrationWarning: true }) : children
|
|
),
|
|
element
|
|
);
|