-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
onIndexChanged this.setState({}) Loop not work #569
Comments
Exactly the same problem for me on |
+1 the same problem. I temporarily added |
Having the same problem but I'm actually dispatching actions. I think it's almost related to #503
|
I'm also having this problem with version |
When planned new npm version with this fix ? |
Still happening in version: 1.5.13 |
Also having this issue. I found that using |
hi @jeppe-smith , can I see how you implement the setTimeout part? |
@ronayumik
that works for me, the |
@EdgarXolop , do you have any idea why it needs the timeout? is it the rendering part that takes too long? |
Solves the issue of state messing up when parent component calls setState [ref leecade#569]
For me, setting |
|
setTimeout seemed to fix the warning |
Solves the issue of state messing up when parent component calls setState [ref leecade/react-native-swiper#569]
Solves the issue of state messing up when parent component calls setState [ref leecade/react-native-swiper#569]
Which OS
ios 10.3
android 6.0
Version
Which versions are you using:
Expected behaviour
Actual behaviour
On Android and IOS I can only swipe 1 to the left from 0 and no more (4/4). And swipe 4 to the right and no more (1/4).
The problems here is for some reason the loop brake in a strange way.
I try different things. And I found the problem is cause by this.setState in the onIndexChanged function which if I don't use it, the loop works.
How to reproduce it>
Steps to reproduce
The text was updated successfully, but these errors were encountered: