create a portal ref to create a portal and append it to the body.
import { createPortal } from "react-dom";
import { usePortal } from "@casperiv/useful/hooks/usePortal";
const Component = () => {
const portalRef = usePortal("myCoolId");
return portalRef ? createPortal(<p>Hello world!</p>, portalRef) : null;
};