Thankfully, because of the way you've built pannable, it was easy to simply make the container view an Animated.View, and get way better performance when panning as long as you supply an Animated.ValueXY to the style, which I show in the updated example. You can choose to not use Animated.ValueXY if you want and it will still work.
Using the setState method I was getting panning where the red box was terribly trailing my finger. With this change, the red box stayed right with my finger.
I haven't made this change on swipeable, but it should be fairly the same idea.
Thankfully, because of the way you've built
pannable
, it was easy to simply make the container view anAnimated.View
, and get way better performance when panning as long as you supply anAnimated.ValueXY
to the style, which I show in the updated example. You can choose to not useAnimated.ValueXY
if you want and it will still work.Using the
setState
method I was getting panning where the red box was terribly trailing my finger. With this change, the red box stayed right with my finger.I haven't made this change on
swipeable
, but it should be fairly the same idea.