UNPKG

react-native-reanimated-carousel

Version:

Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.

13 lines (11 loc) 451 B
import { withSpring, withTiming } from "react-native-reanimated"; export function dealWithAnimation(withAnimation) { "worklet"; switch (withAnimation.type) { case "spring": return (value, cb) => withSpring(value, withAnimation.config, isFinished => cb(isFinished)); case "timing": return (value, cb) => withTiming(value, withAnimation.config, isFinished => cb(isFinished)); } } //# sourceMappingURL=dealWithAnimation.js.map