Element prepended will be displayed above it's siblings, instead of below, unlike how it would happen if rendered initially alongside it's siblings.
const [condition, setCondition] = s.createSignal(true);
document.addEventListener("keydown", (e) => {
if (e.key === "Enter") {
setCondition(!condition());
}
});
return <>
<view>
{condition() && <view color={0xff0000ff} width={100} height={100} x={100} y={10}/>}
<view color={0x00ff00ff} width={100} height={100} x={150} y={30}/>
</view>
</>
before:

after:

When prepending elements, the order is correctly maintained in ElementNode.insertChild by using an anchor.
So ElementNode.children is correct, but the order of ElementNode.lng.children is not.
Not sure how to fix that when the lightning renderer doesn't support passing an anchor element.
The only way would be to manually correct parent.lng.children after lightning node is created.
Element prepended will be displayed above it's siblings, instead of below, unlike how it would happen if rendered initially alongside it's siblings.
before:

after:

When prepending elements, the order is correctly maintained in
ElementNode.insertChildby using an anchor.So
ElementNode.childrenis correct, but the order ofElementNode.lng.childrenis not.Not sure how to fix that when the lightning renderer doesn't support passing an anchor element.
The only way would be to manually correct
parent.lng.childrenafter lightning node is created.