leecade / leecade/react-native-swiper

Dynamic Data Not Work Page Nation Image Slider !!!

Open
#857 2 comments 5 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

Which OS Android
Version

Which versions are you using:

  • react-native-swiper v1.5
  • react-native v0.5.4
Im use remote data to load image slider my code but page nation no work when slide image goto last slide :

`const Slide = props => {
return (
<Image style={styles.image} source={{uri: props.uri}} />
)
};
class SliderComponent extends Component {

constructor (props) {
    super(props);  
    this.state = {
        dataSource: [],
        index: 0
    }      
}
componentDidMount() {

    return fetch('http://awebmaker.ir/top_service/Api/Json/getSlider')
        .then((response) => response.json())
        .then((responseJson) => {
            this.setState({
                dataSource: responseJson,
            }, function() {
                
            });
        })
        .catch((error) => {
            console.error(error);
        });
}

render() {
    return (
        <View style={styles.container}>
            <Swiper
                height={200} autoplay>
                {
                    this.state.dataSource.map((item, index) => <Slide
                        uri={item.image}
                        i={index}
                        key={index} />)                        
                }
            </Swiper>

        </View>
    );
}

}`

Contributor guide

No contributing guide indexed for this repository

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 provided SliderComponent with react-native-swiper v1.5 and its remotely loaded image data, then inspect pagination behavior when swiping to the last image. Done means the pagination indicator remains correct through the final slide, including after the data loads.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.