title: Resize D3 Chart to Parent in React
body: <p>I was working through the tutorial from: <a href="http://ahmadchatha.com/writings/article1.html" rel="nofollow">http://ahmadchatha.com/writings/article1.html</a></p>
  
  <p>And it sets you up with a React Component like this: </p>
  
  <pre><code>class SimplePie extends React.Component {
    render() {
      return (
        &lt;div className="col-xs-4 chart"
          style={{background: this.props.data[1]}} &gt;
          {this.props.title}
          &lt;D3Chart
            width={200}
            height={200}&gt;
            &lt;DataSeries
              data={this.props.data[0]}
              colors={colors}
              width={200} height={200} /&gt;
          &lt;/D3Chart&gt;
        &lt;/div&gt;
      )
    }
  }
  </code></pre>
  
  <p>But I want to change this so the D3Chart will resize based on the size of parent, and listen for resize events.  Is there any easy way to do this in React?</p>
  
  <p>I am struggling with event listeners for resize events on a particular div.</p>