code: function(component, ref, owner) {
      ("production" !== "development" ? invariant(
        ReactOwner.isValidOwner(owner),
        'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' +
        'usually means that you\'re trying to remove a ref to a component that ' +
        'doesn\'t have an owner (that is, was not created inside of another ' +
        'component\'s `render` method). Try rendering this component inside of ' +
        'a new top-level component which will hold the ref.'
      ) : invariant(ReactOwner.isValidOwner(owner)));
      // Check that `component` is still the current ref because we do not want to
      // detach the ref if another component stole it.
      if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) {
        owner.detachRef(ref);
      }
    }
docs: 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