meliorence / meliorence/react-native-snap-carousel
ParallaxImage does not load image
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hello.
After updating react native and libraries to last version, the carousel doesn't show any image
My code:
`const renderItem = ({item, index}, parallaxProps) => {
const even = false;
return (
<TouchableOpacity
activeOpacity={0.5}
style={sliderStyles.slideInnerContainer}
onPress={() => {
snapTo(index);
console.log(item)
dispatch(getCategory(item.id));
}}
>
<View style={sliderStyles.shadow} />
<View style={[sliderStyles.imageContainer, even ? sliderStyles.imageContainerEven : {}]}>
<ParallaxImage
source={{uri: 'https://i.goopics.net/whg4hg.jpg'}}
containerStyle={[sliderStyles.imageContainer, even ? sliderStyles.imageContainerEven : {}]}
style={sliderStyles.image}
parallaxFactor={0.35}
showSpinner={true}
spinnerColor={even ? 'rgba(255, 255, 255, 0.4)' : 'rgba(0, 0, 0, 0.25)'}
onLoad={onLoadEnd}
{...parallaxProps}
/>
<View style={[sliderStyles.radiusMask, even ? sliderStyles.radiusMaskEven : {}]} />
</View>
<View style={[sliderStyles.textContainer, even ? sliderStyles.textContainerEven : {}]}>
<Text style={{fontSize: wp('1.4%'), fontStyle: "italic"}}>{item.name}</Text>
</View>
</TouchableOpacity>
);
}
return (
<RNCarousel
ref={carouselRef}
data={_.orderBy(categoryCarousel, 'name', 'asc')}
renderItem={renderItem}
sliderWidth={sliderWidth}
itemWidth={itemWidth}
inactiveSlideScale={0.7}
inactiveSlideOpacity={0.7}
containerCustomStyle={styles.slider}
contentContainerCustomStyle={styles.sliderContentContainer}
loop={true}
loopClonesPerSide={8}
autoplay={true}
autoplayDelay={3000}
autoplayInterval={3000}
lockScrollWhileSnapping = {true}
hasParallaxImages={true}
/>
);`
the render:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied RNCarousel renderItem with ParallaxImage and the linked image URL on the updated React Native and library versions. Compare the result with the repository's ParallaxImage and carousel usage entry points. Done means the image renders in the reported carousel configuration, or the issue identifies the missing compatibility or configuration detail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100