FuYaoDe / react-native-app-intro

react-native-app-intro is a react native component implementing a parallax effect welcome page using base on react-native-swiper , similar to the one found in Google's app like Sheet, Drive, Docs...
MIT License
3.24k stars 508 forks source link

undefined recEvt[mappingKey]. #106

Open Werewolve opened 6 years ago

Werewolve commented 6 years ago

simulator screen shot - iphone 6s - 2017-11-07 at 01 59 09

I get that error after updating to the latest react native version. Any suggestions?

karna41317 commented 6 years ago

in your component,

replace onScroll with

 onScroll={(e) => {

                const currentScrollPos = e.nativeEvent.contentOffset.y
                const sensitivity = 50

                if (Math.abs(currentScrollPos - this.state.lastScrollPos) > sensitivity) {

                            this.props.doSomething()
                            this.setState({lastScrollPos: e.nativeEvent.contentOffset.y })
                      }
  } }
kenpham4real commented 4 years ago

I encountered this issue again. Anyone found a detailed and clear answer?