react-native-swiper
react-native-swiper copied to clipboard
weird glitch when using useState with another component on the same screen
Which OS ?
developing on Windows, testing with expo on iOS
Version
Which versions are you using:
- react-native-swiper v1.6.0-rc
- react-native v0.64.3
Expected behaviour
when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page should not move slightly to the left
Actual behaviour
when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page moves slightly to the left as if someone started swiping it, and it stays there
How to reproduce it>
To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.
Steps to reproduce
- have slider component as a part of the page
- add in some kind of button that updates the state
- see how the 2nd page or higher shifts slightly left
https://github.com/leecade/react-native-swiper/issues/1266 Add this prop to swiper loadMinimal={true}
https://github.com/leecade/react-native-swiper/issues/1215#issuecomment-686793558 Worked:
In my package.json I changed: "react-native-swiper": "^1.6.0", to "react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",