Open anthonygreco opened 7 years ago
Sorry I just saw this, not sure what you mean? It seems to be working for me.
There's no syntax error, but it still doesn't work. The handleResize
method that should get called on window resize is never called and the render method should display the component's dimensions:
<MeasureComponent bounds onResize={this.handleResize}>
{({ measureRef }) => (
<div ref={measureRef} className='container'>
{JSON.stringify(dimensions)}
</div>
)}
</MeasureComponent>
Worth noting, logging console.log('_resizeObserverPolyfill2', _resizeObserverPolyfill2);
in the umd script returns:
"_resizeObserverPolyfill2" Object {
default: undefined
}
Ah I think it's because I have the Chrome flag turned on so it might be using the native one 😞 sorry about that. I'll work on fixing the dist build as soon as I can.
Any news on this? I'd like to demo my component using react-measure but when I wrap it in
Any idea what's not right about this CodePen?