fix: conditional sibling islands DOM order (#1324)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Signal } from "@preact/signals";
|
||||
|
||||
export default function BooleanButton({ signal }: { signal: Signal }) {
|
||||
return (
|
||||
<button
|
||||
onClick={() => {
|
||||
signal.value = !signal.value;
|
||||
}}
|
||||
>
|
||||
Toggle
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Signal } from "@preact/signals";
|
||||
|
||||
export interface IslandConditionalProps {
|
||||
show: Signal<boolean>;
|
||||
}
|
||||
|
||||
export default function IslandConditional({ show }: IslandConditionalProps) {
|
||||
return show.value ? <>it works</> : null;
|
||||
}
|
||||
Reference in New Issue
Block a user