ReactNative onResponderRelease doesn't work on Android

Viewed 1069

I tried to use ScrollView's onResponderRelease event on an android device, but it dosen't work fine. Code like this:

<ScrollView 
    onResponderRelease = {()=>{console.log('release')}}
/>

I saw many react-native libs used this api like this. Does it support android platform ?

1 Answers

Yes, it has such problem - you can read more about this https://github.com/facebook/react-native/issues/9447

Try to use 'onMomentumScrollEnd', in some cases it will do exactly what do you expect:

<ScrollView 
    onMomentumScrollEnd = {()=>{console.log('release on Android')}}
    onResponderRelease = {()=>{console.log('release on IOS')}}
/>
Related