react-native-app-intro-slider icon indicating copy to clipboard operation
react-native-app-intro-slider copied to clipboard

Feature: Allow setting the activeIndex via props

Open pke opened this issue 3 years ago • 0 comments

It would be nice to be able to set the activeIndex to some specific (clamped) index for advanced usage.

I am currently using an effect to goToSlide but this does not update the activeDots and next and done buttons.

const { id } = props
const ref = useRef<AppIntroSlider>(null)
useEffect(() => {
  ref.current && ref.current.goToSlide(id)
}, [id, ref]

pke avatar Jul 16 '20 16:07 pke