HOC onSize callback alternative usage example not working
modemmute opened this issue · comments
Michael Williams commented
The example presented in the "HOC Usage" / "'onSize' callback alternative usage" is not working.
https://codesandbox.io/s/react-sizeme-test-8wooy
The returned object only contains a value for the width. The height and position are null. Or am I doing something wrong? I tried downgrading the React & React-DOM version back down to 16.8 with the same results. Any help appreciated!
Sean Matheson commented
You need to add monitorHeight
to the configuration options.
sizeMe({ monitorHeight: true })(Component);
The position is never tracked. Sorry that is an artifact from a failed experiment.