import { createPortal } from 'react-dom';
import { resolveContainer } from './getContainer';
export function renderToContainer(getContainer, node) {
  if (getContainer) {
    const container = resolveContainer(getContainer);
    return createPortal(node, container);
  }

  return node;
}