This is inspired by: https://github.com/KyleAMathews/react-page-width
React component that detects when an wrapped element resizes
npm install react-sonar
var ReactSonar = require('react-sonar');
<ReactSonar handleResize={this.handleResize}>
...
</ReactSonar>