title: React - 'Uncaught TypeError: Cannot read property in reader.onload
body: <p>When I run code below</p>
  
  <p>console display:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'component' of undefined
  </code></pre>
  
  <p>but the test code can display:</p>
  
  <pre><code>ReactDOM.findDOMNode(this.refs.component).innerText = 'ddd';
  </code></pre>
  
  <p>What's problem? </p>
  
  <pre><code>var reader = new FileReader();
  
  reader.onload = function(e) {
    console.log('onload: ' + e.target.result);
    ReactDOM.findDOMNode(this.refs.component).innerText = e.target.result;                   
  }
  
  reader.onerror = function(stuff) {
      console.log("error", stuff);
      console.log (stuff.getMessage());
  }
  
  ReactDOM.findDOMNode(this.refs.component).innerText = 'ddd';
  console.log('readAsText:' + reader.readAsText(data[0]));
  </code></pre>