Closed akphi closed 3 years ago
@maslianok Thank you!! I will check it later. I think we accidentally left a 'console.log' in the code for useResizeDetector though š Submitted a PR to save you some time.
someday I won't forget about console.logs... someday... š
Thanks for the PR. Published in 6.3.1 :)
Consider the following scenarios. When the value of
editor
is updated, thehooks
form won't allow you to use another version ofonResize
witheditor !== null
. This also appears to be the case forhandleWidth
andhandleHeight
.I guess the workaround for
onResize
is to useuseEffect
with the value ofheight
andwidth
returned fromuseResizeDetector()
. But the fact thathandleWidth
andhandleHeight
cannot be dynamic makes it hard for me to try out hooks form š