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

ReactResizeDetector Component is not working with React18 #208

Closed pkawula closed 2 years ago

pkawula commented 2 years ago

I have found that when installing React 18 the onResize prop is not even called when you resize the window, however the useResizeDetector hook works properly.

Here's reproduction https://github.com/pkawula/resize-example

Remember to install dependencies with --legacy-peer-deps to avoid errors

maslianok commented 2 years ago

@pkawula thank you for your contributions to the project!

I want to give you some personal prize, but let's stick with the Contributor role for now 😄