import { render, unmount as reactUnmount } from "./render";
function renderToBody(element) {
  const container = document.createElement("div");
  document.body.appendChild(container);
  function unmount() {
    const unmountResult = reactUnmount(container);
    if (unmountResult && container.parentNode) {
      container.parentNode.removeChild(container);
    }
  }
  render(element, container);
  return unmount;
}
export {
  renderToBody
};
