title: Getting "TypeError: document.getElementById(...) is null" when using react.js with chart.js
body: <p>I am using react and chart.js together to plot bar chart. But in chart.js we have to use canvas tags and to find that tag and to place bar chart in it we use our normal <code>document.getElementById()</code> method. I tried lots of combinations like putting <code>document.getElementById()</code> at the beginning, or inside a <code>$(document).ready()</code>, even within react's <code>componentDidMount()</code> method. But Still I am getting "<code>TypeError: document.getElementById(...) is null</code>". If anyone know about it, please give me a suggestion. 
  Thank You.</p>
  
  <p>Here is the code which I am trying to execute:</p>
  
  <pre><code>var React = require("react");
  
  var Chart = React.createClass({
  
      getDefaultProps: function() {
          barChartData = {
              labels : ["Option1", "Option2"],
              datasets : [
                  {
                      fillColor : "rgba(220,220,220,0.5)",
                      strokeColor : "rgba(220,220,220,0.8)",
                      highlightFill: "rgba(220,220,220,0.75)",
                      highlightStroke: "rgba(220,220,220,1)",
                      data : [65, 35]
                  }
              ]
          }
      },
  
      onload: function() {
          console.log(document.getElementById('canvas_poll'));
          var ctx = document.getElementById("canvas_poll").getContext("2d");
  
          window.myBar = new Chart(ctx).HorizontalBar(this.props.barChartData, {
              responsive : true,
          });
      },
  
      componentDidMount: function() {
          this.onload();
      },
  
      render: function() {
  
          return (
              &lt;div&gt;
                  &lt;canvas classID="canvas_poll" height={100} width={600}&gt;&lt;/canvas&gt;
              &lt;/div&gt;
          );
      }
  
  });
  
  module.exports = Chart;
  </code></pre>