[Android] Invariant Violation: "this.props" should not be accessed during state updates
Verson info: "react-native": "0.71.3", "react-native-timer-picker": "^1.10.1",
When using TimePicker, a quick swipe will result in the following exception:
Invariant Violation: "this.props" should not be accessed during state updates
This error is located at:
in VirtualizedList
in FlatList
in RCTView
in Unknown
in Unknown
in RCTView
in Unknown
in Unknown
in RCTView
in Unknown
in RCTView
in Unknown
in AnimatedComponent
in AnimatedComponentWrapper
in Unknown
in RCTView
in Unknown
in RCTView
in Unknown
in AnimatedComponent
in AnimatedComponentWrapper
in ThemeProvider
in RCTView
in Unknown
in PortalManager
in Portal.Host
in RNCSafeAreaProvider
in SafeAreaProvider
in SafeAreaProviderCompat
in PaperProvider
in App
in RCTView
in Unknown
in ChildrenWrapper
in _default
in Root
in RCTView
in Unknown
in AppContainer, js engine: hermes, stack:
Hey @stonehiy,
Thanks for raising this. Will take a look ASAP and get this fixed 🙌
Hey @stonehiy, can you share your code please? Struggling to recreate this error without it.
Hey @stonehiy, can you share your code please? Struggling to recreate this error without it.
https://github.com/stonehiy/react-native-timer-picker_demo
https://s17.aconvert.com/convert/p3r68-cdx67/1upsj-v46ol.gif
Hey @stonehiy, thanks for sharing the demo. I'm still not seeing that error on my end but I had a suspicion of what might be causing it.
I've safeguarded against it in the latest version (v1.10.3). Please try upgrading to that version, and let me know if the error persists 🙌
Hey @stonehiy, thanks for sharing the demo. I'm still not seeing that error on my end but I had a suspicion of what might be causing it.
I've safeguarded against it in the latest version (
v1.10.3). Please try upgrading to that version, and let me know if the error persists 🙌
Hey @troberts-28 ,I have tried to use the lasest version(v1.10.3), but this bug isn't fixed to me.
Ah ok, will have another go at recreating it and get back to you 👍
Hey @stonehiy,
Sorry to only just be picking this up.
I have pinned down the problem to this React Native Issue, which was fixed in React Native v0.72.0.
I've decided not to go in and try and make the logic compatible with the versions of RN that contained this issue, so my recommendation is to upgrade you RN version to 0.72 or above.
I have increased the projects' peer dependency versions to reflect the incompatibilty.