Which versions are you using:
`const Slide = props => {
return (
)
};
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>
);
}
}`
+1 @awebmaker I'm facing the same issue and the pagination indicator not moving to another dot, the work around is by using conditional rendering to swiper, example...
{this.state.welcomeImage.length > 0 ?
<Swiper
autoplay= {true}
autoplayTimeout= {5}
paginationStyle= {styles.pagination}
>
{this.state.welcomeImage.map((item, index) => {
return (
<View
key={index}
style= {styles.welcomeImage}
/> // and so on...
+1 How to fix ???
Most helpful comment
+1 @awebmaker I'm facing the same issue and the pagination indicator not moving to another dot, the work around is by using conditional rendering to swiper, example...