React-id-swiper: Events - how can I call on slideChange

Created on 25 Jan 2018  路  2Comments  路  Source: kidjp85/react-id-swiper

Hey man, how can I call slideChange event?

Most helpful comment

@kresogalic8 To give a more accurate answer, according to this file, here is how you do this :

onSlideChange() {
  console.log('slide changed');
}

render () {
  const params = {
    on: {
      slideChange:this.onSlideChange
    }
  };

  return (
    <Swiper {...params}>
      ...
    </Swiper>
  )
}

All 2 comments

Please refer Swiper API for Event

@kresogalic8 To give a more accurate answer, according to this file, here is how you do this :

onSlideChange() {
  console.log('slide changed');
}

render () {
  const params = {
    on: {
      slideChange:this.onSlideChange
    }
  };

  return (
    <Swiper {...params}>
      ...
    </Swiper>
  )
}
Was this page helpful?
0 / 5 - 0 ratings