I\'m I understanding it correctly ? Does this two set of code meant the same thing ?Does it have any difference in performance or reliability ?
Yes there is a difference in semantic
The first one i.e the above Animated.event
returns a function that sets the scrollview's nativeEvent.contentOffset.y
to your current scrollY state which I assume is animated.
The other code just sets scrollY
to your scrollView's e.nativeEvent.contentOffset.y
and causes a rerender to your component