preact-custom-element
preact-custom-element copied to clipboard
Provide light dom props children
This commit provides a resolution for issue #41, applying a strategy similar to the one used in pull request #56. The commit ensures that the children of a component, such as 'FooComponent', are correctly rendered even without using the Shadow DOM.
An example component which should render now correct in the not shadow-dom:
function FooComponent(props) {
return (
<Fragment>
<h1>My Heading</h1>
{/* Render the children inside this div */}
<div>{props.children}</div>
</Fragment>
);
}