From 25a35178324caf4aa9af845b212c587642e273c8 Mon Sep 17 00:00:00 2001 From: Koushik Maratha Date: Tue, 30 Jun 2020 12:34:59 +0530 Subject: [PATCH] Fixed the UNSAFE_componentWillMount && UNSAFE_componentWillReceiveProps issue and also fixed useNativeDriver property to Animated module --- src/Carousel.tsx | 9 +++++---- yarn.lock | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 yarn.lock diff --git a/src/Carousel.tsx b/src/Carousel.tsx index 9a8952b..1b8d9b8 100644 --- a/src/Carousel.tsx +++ b/src/Carousel.tsx @@ -18,7 +18,7 @@ export interface CarouselProps { autoplay?: boolean; autoplayTimeout?: number; slipFactor?: number; - animation?: (animate: Animated.Value, toValue: number, useNativeDriver: false,) => Animated.CompositeAnimation; + animation?: (animate: Animated.Value, toValue: number) => Animated.CompositeAnimation; onPageChanged?: (index: number) => void; showsPageIndicator?: boolean; renderPageIndicator?: (config: PageIndicatorConfig) => JSX.Element; @@ -47,7 +47,8 @@ export default class Carousel extends React.Component { this.startPanResponder(); @@ -109,7 +110,7 @@ export default class Carousel extends React.Component