feat: support conditional island JSX children (#1355)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
co-authored by
Asher Gomez
parent
dff80d3a42
commit
11077227b5
@@ -0,0 +1,10 @@
|
||||
import { Signal } from "@preact/signals";
|
||||
|
||||
export default function Counter({ count }: { count: Signal<number> }) {
|
||||
return (
|
||||
<div>
|
||||
<p class="count">{count}</p>
|
||||
<button class="counter" onClick={() => count.value++}>update</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user