code: function(component, ref, owner) {
      ("production" !== "development" ? invariant(
        ReactOwner.isValidOwner(owner),
        'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' +
        'usually means that you\'re trying to add 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)));
      owner.attachRef(ref, component);
    }
docs: Adds a component by ref to an owner component.
  
  @param {ReactComponent} component Component to reference.
  @param {string} ref Name by which to refer to the component.
  @param {ReactOwner} owner Component on which to record the ref.
  @final
  @internal