Bug Report
Yes
Yes
Yes
Both
Yes
Yes
Environment:
React: 16.0.0-alpha.12
React native: 0.47.2
react-native-snap-carousel: 3.6.0
Target Platform:
Android (6.0), 7.0, 8.0
iOS (10.3) , 11.2
Switching the tabs should not affect Carousel
Carousel generates error related to ScrollView

Getting same issue

Hey guys,
I'm willing to take a look at the issue, but I cannot do that without a complete example that reproduces the issue ;-)
I'm facing the same error and it happens with tinder and slack layout. To be clear, I've a screen with two tabs, one of them has the carousel and the other one not. If I switch between those tabs, that error appears on the carousel tab.
Hi @juanlacruz,
Same answer as above: one of you guys needs to provide me with a Snack example that reproduces the issue, otherwise there is no way for me to help you.
Hey all,
I was seeing this myself and it appears to have been in response to the way that I was allowing my home screen elements to be customizable.
Long story short I just had to remove this from my carousel in order to diagnose the root of my issue: useScrollView={true}
After removing that prop the error disappeared and I realized that a wrapper component rendering a list of components(one being a section with the carousel) was conditionally returning null in it's render function rather than render the remaining carousel.
After removing the "return null" everything worked properly and I restored "useScrollView={true}" to my carousel without issue.
Hope this helps someone
Hey @jrounsav,
Thanks for sharing your findings ;-)
Still, regarding the issue, I'm going to implement the getNode() method in order to have something more bulletproof. Hopefully, this will solve the issue for everyone.
Hi @bd-arc, same issue here.
My code is very simple:
<Carousel
loop
autoplay
layout={'tinder'}
layoutCardOffset={10}
data={[1, 2, 3]}
renderItem={this.renderHeaderImage.bind(this)}
sliderWidth={windowWidth}
itemWidth={windowWidth - 100}
/>
There are no conditionals operators, nor return null and the item is just an Image wrapped by a View.
I'm using react-native-snap-carousel version 3.6.0 and react native version 0.53.3.
I've noticed that the problem appears only if the js debugger is not active.
Hey guys,
I've refactored a few things in version 3.7.0. Can you try and let me know if you still experience the issue?
I was facing this issue on version 3.5. After upgrade to version 3.7.0, looks like the issue is solved.
@rafaelpizzaia Thanks for letting me know ;-)
Most helpful comment
Getting same issue