In my simple react app, I have the following component structure:
<div id='app'>
<Navbar />
<Graph />
<Footer />
</div>
The Navbar has a fixed height of 80px.
The Footer has a fixed height of 40px.
The Graph is a d3-wrapper div that contains an SVG with graph elements.
How can I make sure the Graph always occupies the remaining height of the screen?
What is the best way to update the react component containing the d3-wrapper/SVG on a resize event?
Note: To ensure the graph is responsive, it is important not to hardcode the width and height of the SVG element.
Here is a codepen snippet where I attempted to address this issue.