From 6744f747424d6ad51e61bca0702eec8e60d00441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=9D=B1=E6=BE=94?= Date: Mon, 1 Nov 2021 19:49:23 +0800 Subject: [PATCH] fix: fix bug with reanimated --- src/Carousel.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Carousel.tsx b/src/Carousel.tsx index c43ac909..064c62f2 100644 --- a/src/Carousel.tsx +++ b/src/Carousel.tsx @@ -259,10 +259,9 @@ function Carousel( function _withAnimationCallback(num: number) { return withSpring( num, - { - ...timingConfig, + Object.assign({}, timingConfig, { velocity: e.velocityX, - }, + }), (isFinished) => { if (isFinished) { runOnJS(onScrollEnd)();