We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS: macOS High Sierra 10.13.5
Which versions are you using: Node: 8.9.1 Yarn: 1.6.0 npm: 6.3.0 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4819257
react: 16.3.1 => 16.3.1 react-native: 0.55.1 => 0.55.1 react-native-swiper: "^1.5.13"
Get the current active index for a button outside of swiper
Every thing works fine except:
Change the code of first Swiper (link: https://github.com/leecade/react-native-swiper/blob/master/examples/components/Swiper/index.js) to this
<Swiper style={styles.wrapper} height={200} autoplay onMomentumScrollEnd={(e, state, context) => this.setState({index: state.index})}> <View style={styles.slide1}> <Text style={styles.text}>Hello Swiper</Text> </View> <View style={styles.slide2}> <Text style={styles.text}>Beautiful</Text> </View> <View style={styles.slide3}> <Text style={styles.text}>And simple</Text> </View> <View style={styles.slide1}> <Text style={styles.text}>4</Text> </View> <View style={styles.slide2}> <Text style={styles.text}>5</Text> </View> <View style={styles.slide3}> <Text style={styles.text}>6</Text> </View> </Swiper>
And the state construct:
constructor (props) { super(props); this.state={ index: 0 } }
If it is just console.log, nothing wrong, but once it set state, it goes wrong for any names
Please help,
Thanks
The text was updated successfully, but these errors were encountered:
I found the problem, it is cause of setState and loop={true} can't work together. Duplicate to #569 Close this~
Sorry, something went wrong.
No branches or pull requests
Which OS ?
OS: macOS High Sierra 10.13.5
Version
Which versions are you using:
Node: 8.9.1
Yarn: 1.6.0
npm: 6.3.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4819257
react: 16.3.1 => 16.3.1
react-native: 0.55.1 => 0.55.1
react-native-swiper: "^1.5.13"
Expected behaviour
Get the current active index for a button outside of swiper
Actual behaviour
Every thing works fine except:
How to reproduce it>
Change the code of first Swiper (link: https://github.com/leecade/react-native-swiper/blob/master/examples/components/Swiper/index.js) to this
And the state construct:
Steps to reproduce
If it is just console.log, nothing wrong, but once it set state, it goes wrong for any names
Please help,
Thanks
The text was updated successfully, but these errors were encountered: