fix: only render keyed comments when needed (#1859)

This commit is contained in:
Marvin Hagemeister
2023-10-04 22:07:06 +02:00
committed by GitHub
parent 0e58c6b475
commit 3b73449a93
5 changed files with 77 additions and 37 deletions
@@ -0,0 +1,15 @@
import { ComponentChildren } from "preact";
export default function SlotDemo() {
return (
<div>
<Foo key="A">A</Foo>
<Foo key="B">B</Foo>
<Foo key="C">C</Foo>
</div>
);
}
function Foo(props: { children?: ComponentChildren }) {
return <p>{props.children}</p>;
}