Undocumented props. Why?


onMomentumScrollEnd will fire when the animation of the ScrollView stops.

For example, you can use the following snippet, to get the Y position of a <ScrollView ref="scrollView" />:

const RCTUIManager = require('NativeModules').UIManager
const sv = this.refs['scrollView'] as any
RCTUIManager.measure(sv.getInnerViewNode(), (...data) => {

And this is the order in which events of a ScrollView fire, in case you ever find yourself looking for answers that can’t be found in the official docs.

onTouchStart={() => console.log('onTouchStart')}
onTouchMove={() => console.log('onTouchMove')}
onTouchEnd={() => console.log('onTouchEnd')}
onScrollBeginDrag={() => console.log('onScrollBeginDrag')}
onScrollEndDrag={() => console.log('onScrollEndDrag')}
onMomentumScrollBegin={() => console.log('onMomentumScrollBegin')}
onMomentumScrollEnd={() => console.log('onMomentumScrollEnd')}



When we have an input field on the bottom of the screen and we focus it, the keyboard covers the field and we will not know what we are typing inside.

My solution is a mix of two StackOverflow answers, which I will reference at the bottom. Also, apparently the React Native team tackled this issue in the 0.30.0 release. I tried it and it didn’t work the way I wanted, but maybe it was me doing something wrong.

Oh and of course this might not be the best way to do it at all, but it works for me and doesn’t look awful.

Click to see the code.