The problem
If I add onContentSizeChange prop to my scrollView, it is running every millisecond without size change
Here is my code
<ScrollView onContentSizeChange={(width, height) => {
this.setState({scrollHeight: height});
console.log(width)
}}
style={{height:this.state.height, width:this.state.width}}>
{/* Another Components */}
</ScrollView>
How to reproduce
Fix listener to work only on content size change
Environment
I face the problem as well but it is happening in Safari 12.1.1. The prop is not triggered once the content's size is changing. Weirdly enough, the prop is working after you resize the browser.
The prop is working as expected on chrome 79.0.3945.88 and firefox 72.0.1.

related sandbox: https://codesandbox.io/s/sticky-scroll-wun6s
I face the problem as well but it is happening in Safari 12.1.1. The prop is not triggered once the content's size is changing. Weirdly enough, the prop is working after you resize the browser.
The prop is working as expected on chrome 79.0.3945.88 and firefox 72.0.1.
related sandbox: https://codesandbox.io/s/sticky-scroll-wun6s
A temporary solution to me by calling window.dispatchEvent(new Event(‘resize’)) in safari at the end of the action which triggers the content size changing.
Most helpful comment
A temporary solution to me by calling
window.dispatchEvent(new Event(‘resize’))in safari at the end of the action which triggers the content size changing.