import { useEffect, useState } from "preact/hooks"; export default function IslandWithProps( props: { foo: { bar: string } }, ) { const [showText, setShowText] = useState(false); useEffect(() => { setShowText(true); }, []); return (

{showText ? props.foo.bar : "it doesn't work"}

); }