Quantcast
Viewing all articles
Browse latest Browse all 17068

gestureState and nativeEvent difference

I am trying to use React Native's PanResponder. In its callback functions there are two parameters that can be invoked: event and gestureState. If I log the event.nativeEvent, and the gestureState object there are keys which have the same values (eg. pageX and moveX), and there are different keys. What I don't understand is the reason for using 2 callback parameters and not one object containing all the keys. I'm sure it must have its reasons, but what are those? Can somebody explain it and give some examples?


Viewing all articles
Browse latest Browse all 17068

Trending Articles