react-native-onboarding-swiper icon indicating copy to clipboard operation
react-native-onboarding-swiper copied to clipboard

Load Page 0 (set an initial state)

Open AleMaiaF opened this issue 5 years ago • 0 comments

Hello, I created a separated page for the SlideShow in my App but if I leave the page and go back to it, the page stays in the last slide I was in instead of going back to the first page. Any idea of how I can set an initial state for the SlideShow to always load it's first page when I go to it? I was trying to implement something like this:

initialState = () => {
  // load page 0 
}

componentDidMount(){ this.load() this.props.navigation.addListener('willFocus', this.load) } load = () => this.initialState(true)

AleMaiaF avatar Jan 03 '20 13:01 AleMaiaF