code: function(ref, component) {
      var inst = this.getPublicInstance();
      var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs;
      refs[ref] = component.getPublicInstance();
    }
docs: Lazily allocates the refs object and stores `component` as `ref`.
  
  @param {string} ref Reference name.
  @param {component} component Component to store as `ref`.
  @final
  @private