react-native-card-stack-swiper
react-native-card-stack-swiper copied to clipboard
How to use it in Functional Component
Passing ref props in CardStack gives an error ref = {this.swiper = swiper } this gives an error
Hello, these lines might help.
let swiper: any = useRef
<CardStack ref={swiper} ...
onPress={() => swiper.current?.swipeLeft()}
<TouchableWithoutFeedback onPress={() => swiper.current?.swipeRight()}> <MaterialIcons name="favorite" size={30} color={colors.icon} /> </TouchableWithoutFeedback>