Acessando `this` em reagir ao atribuir método a um evento

Peça desculpas antecipadamente, sou muito novo no React.

NoprintDocument Estou definindo ooHiddFrame.onload = this.setPrint; até parathis.setPrint mas estou recebendo um erro deCannot set property '__container__' of undefined parathis nosetPrint na primeira tarefa.

Estou definindoonClick={this.printDocument.bind(null, this.props.document.view_href)} no botão render (). Como vincular "this" ao evento real ao qual estou atribuindo?

Aprecio muito qualquer ajuda ou conselho.

  closePrint: function () {
    document.body.removeChild(this.oHiddFrame.__container__);
  },

  setPrint: function () {
    this.contentWindow.__container__ = this;
    this.contentWindow.onbeforeunload = this.closePrint;
    this.contentWindow.onafterprint = this.closePrint;
    this.contentWindow.focus();
    this.contentWindow.print();
  },

  printDocument: function (url) {
    var oHiddFrame = document.createElement("iframe");
    oHiddFrame.onload = this.setPrint;
    oHiddFrame.style.visibility = "hidden";
    oHiddFrame.style.position = "fixed";
    oHiddFrame.style.right = "0";
    oHiddFrame.style.bottom = "0";
    oHiddFrame.src = url;
    document.body.appendChild(oHiddFrame);
  },

questionAnswers(3)

yourAnswerToTheQuestion