Welly Shen
Welly Shen
I have the same issue :(
@sirkrisp The `entry` reflects the [ResizeObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry) of the callback of [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#parameters). The `entry` only be initialized once the call is triggered while the size of the element is changed.
@sirkrisp It's OK I can understand what you meant. Actually, that's the behavior of the [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#parameters). So I designed the initial value of the `entry` as `undefined`. Isn't that enough?
@sirkrisp Why don't you just use the [width and height](https://github.com/wellyshen/react-cool-dimensions#return-object) state? Their initial value is `0`.
@sirkrisp Hmm... maybe we can have an initial width/height option, which can be defined by the user. Do you think that will be helpful?
@sirkrisp Alright will take time for that. Also, a PR is welcome. What I think is a simple "initialWidth" and "initialHight" their default values are 0.
@sirkrisp No problem mate. A proposal might be great 👍🏻
@sirkrisp Any updates?
@terebentina Thank you for reporting this issue.
@MP3Martin I think it might work, just try it and let me know.