meliorence / meliorence/react-native-snap-carousel

ParallaxImage does not load image

Open
#1,044 1 comment 0 reactions 0 assignees View on GitHub

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:

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.