Open faisalhok opened 4 years ago
Friendly ping. Anyone please?
can be fixed with useScrollView true
Thank you, this worked like a charm!
I set useScrollView as true and the scrollToOffset issue fixed. But I got another error. wrappedRef.scrollTo is not a function.
@leonboripgs Here it worked by changing the ref:
ref={carousel => (this._carousel = carousel)}
How can I do this without useScrollView={true}. I don't want to use ScrollView because it's laggy.
Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2
Newbie here:
I am using the Carousel inside a flat list to render some cards. I would like to tap on one of the cards to go to the next one. I assigned a reference to the carousel and using the following code on the card that is being rendered:
<TouchableWithoutFeedback onPress={() => carousel.snapToNext(activeSlide)}>
This works just fine.
Then I extended my project and made it a two page app that is based on react-navigation-stack. Now, the carousel works fine with swiping but the tapping on a card to go to the next one using the above function doesn't work anymore. I get the following TypeError:
"wrappedRef.scrollToOffset is not a function" "wrappedRef.scrollToOffset(options)" "wrappedRef.scrollToOffset is undefined"
Some suggestions or solutions would be highly appreciated. Thank you in advance.
My Carousel setting
Rendering the cards in TopNews