import { PortalProvider, PortalOutlet, Portal } from './portal.tsx'; export default function App() { const [showA, setShowA] = useState(false); const [showB, setShowB] = useState(false); return (
{showA ? A : null} {showB ? B : null} {(nodes) => ( {nodes} )}
); } const Modal = ({ children }: ModalProps) => { const id = useId(); const nodeRef = React.useRef(null); return (
{children}
); };