Animated.event()

static event(argMapping, config?)

Takes an array of mappings and extracts values from each arg accordingly, then calls setValue on the mapped outputs. e.g.

 onScroll={Animated.event(
   [{nativeEvent: {contentOffset: {x: this._scrollX}}}]
   {listener},          // Optional async listener
 )
 ...
 onPanResponderMove: Animated.event([
   null,                // raw event arg ignored
   {dx: this._panX},    // gestureState arg
 ]),
doc_React_Native
2016-06-23 04:23:34
Comments
Leave a Comment

Please login to continue.