message: fix: Fix portaled components without dimensions in the first render
  Closes
diff: import * as React from "react";
  import * as ReactDOM from "react-dom";
  +import { useIsomorphicEffect } from "reakit-utils/useIsomorphicEffect";
  export type PortalProps = {
  /**
  @@ -21,7 +22,7 @@ export function Portal({ children }: PortalProps) {
  // otherwise it's document.body
  // https://github.com/reakit/reakit/issues/513
  const context = React.useContext(PortalContext) || getBodyElement();
  - const [portal] = React.useState(() => {
  + const [hostNode] = React.useState(() => {
  if (typeof document !== "undefined") {
  const element = document.createElement("div");
  element.className = Portal.__className;
  @@ -31,20 +32,20 @@ export function Portal({ children }: PortalProps) {
  return null;
  });
  - React.useEffect(() => {
  - if (!portal || !context) return undefined;
  - context.appendChild(portal);
  + useIsomorphicEffect(() => {
  + if (!hostNode || !context) return undefined;
  + context.appendChild(hostNode);
  return () => {
  - context.removeChild(portal);
  + context.removeChild(hostNode);
  };
  - }, [portal, context]);
  + }, [hostNode, context]);
  - if (portal) {
  + if (hostNode) {
  return ReactDOM.createPortal(
  - <PortalContext.Provider value={portal}>
  + <PortalContext.Provider value={hostNode}>
  {children}
  </PortalContext.Provider>,
  - portal
  + hostNode
  );
  }
  