diff --git a/docs/animations.html b/docs/animations.html index 2264f120ae7..a3b1b0e885e 100644 --- a/docs/animations.html +++ b/docs/animations.html @@ -117,13 +117,13 @@ contains nested objects. In the example, you can see that scrollX handler), and pan.x and pan.y map to gestureState.dx and gestureState.dy, respectively (gestureState is the second arg passed to the PanResponder handler).

onScroll={Animated.event( // scrollX = e.nativeEvent.contentOffset.x - [{nativeEvent: {contentOffset: {x: scrollX}}}] + [{nativeEvent: {contentOffset: {x: scrollX}}}] )} onPanResponderMove={Animated.event([ null, // ignore the native event // extract dx and dy from gestureState // like 'pan.x = gestureState.dx, pan.y = gestureState.dy' - {dx: pan.x, dy: pan.y} + {dx: pan.x, dy: pan.y} ]);

Responding to the Current Animation Value #

You may notice that there is no obvious way to read the current value while animating - this is because the value may only be known in the native runtime due to optimizations. If you need to run JavaScript in response to the current