fix: only render keyed comments when needed (#1859)
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
Reference in New Issue
Block a user