import ReactReconciler from "react-reconciler";
const hostConfig = {
  now: Date.now,
  getRootHostContext: () => {},
  clearContainer: () => {},
  prepareForCommit: () => {},
  resetAfterCommit: () => {},
  getChildHostContext: () => {},
  shouldSetTextContent: () => {},
  createInstance: () => {},
  createTextInstance: () => {},
  appendInitialChild: () => {},
  appendChild: () => {},
  finalizeInitialChildren: () => {},
  supportsMutation: true,
  appendChildToContainer: () => {},
  prepareUpdate = () => {},
  commitUpdate = () => {},
  commitTextUpdate = () => {},
  removeChild = () => {},
}
const ReactReconcilerInst = ReactReconciler(hostConfig);
export const render = (reactElement, domElement, callback) => {
  if (!domElement._rootContainer) {
    console.log(ReactReconcilerInst);
    domElement._rootContainer = ReactReconcilerInst.createContainer(domElement);
  }
  // 컨테이너 업데이트
  return ReactReconcilerInst.updateContainer(reactElement, domElement._rootContainer, null, callback);
}
export default {
  render
}
// "react-reconciler": "0.26.2",
// "react": "17.0.2",