function unmountComponentFromNode(instance, container, safely) {
  if (false) {}
  ReactReconciler.unmountComponent(instance, safely);
  if (false) {}

  if (container.nodeType === DOC_NODE_TYPE) {
    container = container.documentElement;
  }

  // http://jsperf.com/emptying-a-node
  while (container.lastChild) {
    container.removeChild(container.lastChild);
  }
}
Removes a component by ref from an owner component.

@param {ReactComponent} component Component to dereference.
@param {string} ref Name of the ref to remove.
@param {ReactOwner} owner Component on which the ref is recorded.
@final
@internal