A React component to implement cross-browser event based resize detection