title: In componentDidUpdate refs is undefined
body: <p>I want to use Chart.js on my website. As you can see title, I'm using React.js. To use Chart.js, I need the canvas and context like this:</p>
  
  <pre><code>let context = document.getElementById('canvas').getContext('2d');
  let chart = new Chart(context, ...);
  </code></pre>
  
  <p>so I design the component like this:</p>
  
  <pre><code>export function updateChart() {
      let context = this.refs.chart.getContext('2d');
      let chart = new Chart(context ,... );
      ...
  }
  
  export default class GraphChart extends React.Component {
      constructor() {
          super();
          updateChart = updateChart.bind(this);
      }
      componentDidMount() {
          updateChart();
      }
      render() {
          return &lt;canvas ref="chart" className="chart"&gt;&lt;/canvas&gt;;
      }
  }
  </code></pre>
  
  <p>as you can see, I exported two things, update chart function and GraphChart class. Both will using in parent component like this:</p>
  
  <pre><code>import { updateChart } from './GraphChart';
  import GraphChart from './GraphChart';
  
  class Graph extends React.Component {
      ...
      someKindOfAction() {
          // update chart from here!
          updateChart();
      }
      render() {
          return (
              &lt;div&gt;
                  &lt;SomeOtherComponents /&gt;
                  &lt;GraphChart /&gt;
              &lt;/div&gt;
          );
      }
  }
  </code></pre>
  
  <p>then Parent class using exported updateChart function to update chart directly. It was working, but only first time. After unmount and mount the GraphChart component, it's refs are just empty.</p>
  
  <p>Why refs is empty? And If I did wrong way, how can I get canvas context for initialize Chart.js?</p>