title: Getting height of children elements in a React component
body: <p>Inside a React component, I want to be able to calculate the combined height of each of my child containers, in this case, the three h3 elements, so that I can calculate the exact height of my parent div when animating the transition of its height. I have seen examples of this with basic js as well as using component mounting methods, but how do I get the height of these elements using just JavaScript?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class Div extends React.Component {
    render() {
      return (
        &lt;div&gt;
          &lt;h3&gt;Description One&lt;/h3&gt;
          &lt;h3&gt;Description Two&lt;/h3&gt;
          &lt;h3&gt;Description Three&lt;/h3&gt;
        &lt;/div&gt;
      );
    }
  }
  
  ReactDOM.render(&lt;Div /&gt;, app);</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    background-color: pink;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>