♻️Webcomponents with hybrid rendering
Improve the interaction of your inputs with forms using hybrid rendering (LightDOM and ShadowDOM)
function componentWithLightDom() {
return (
<host>
<h1>I am in the lightDOM</h1>
</host>
);
}
function componentWithShadowDom() {
return (
<host shadowDom>
<h1>I am inside the shadowDOM</h1>
</host>
);
}import { useRender } from "@atomico/hooks/use-render";
function componentWithLightDomAndShadowDom() {
useRender(() => <h1>I am in the lightDOM</h1>);
return (
<host shadowDom>
<h1>I am inside the shadowDOM</h1>
</host>
);
}What are the benefits of using useRender?
Patch the limitations of web components that use shadow DOM, to improve communication with forms
Conclucion
Last updated
Was this helpful?
