maslianok / react-resize-detector

A Cross-Browser, Event-based, Element Resize Detection for React
http://maslianok.github.io/react-resize-detector/
MIT License
1.25k stars 91 forks source link

Issue #237 - Do not call onResize during setSize updater function in createNotifier #239

Closed tylerprice1 closed 1 year ago

tylerprice1 commented 1 year ago

Updated createNotifier to conditionally call setSize based on the current size. Also reference my comment here: https://github.com/maslianok/react-resize-detector/issues/237#issuecomment-1489031131

Things work okay in the local example, and I didn't see any unit tests, but I'm happy to do any specific testing that you guys need.

tylerprice1 commented 1 year ago

This has the enhancement label, but it's fixing a React error. Should it be labelled a bug instead?