react-native-swipeable-item
react-native-swipeable-item copied to clipboard
Uncaught TypeError: Cannot read properties of undefined (reading 'previousStyle') when experimenting readme example
This package has external dependencies of react-native-reanimated and react-native-gesture-handler which must be installed separately. Before opening an issue related to animations or gestures please verify that you have completed ALL installation steps, including the changes to MainActivity.
Describe the bug When experimenting with the readme example and after swiping any list item, I got the error "Uncaught TypeError: Cannot read properties of undefined (reading 'previousStyle')". After that, the browser almost froze during this weird error.
Steps to reproduce the behavior:
Just try the readme example.
Platform & Dependencies Please list any applicable dependencies in addition to those below (react-navigation etc).
Not applied?
Platform (iOS/Android):
React Native or Expo version: Expo v43.0.3
react-native-reanimated
version: 2.2.4
react-native-gesture-handler
version: 1.10.3
Additional context
The error was raised when testing the example on the web browser (using react-native-web).
Hm the web example works fine for me: https://snack.expo.dev/@computerjazz/swipeable-draggable-list
I'm not sure where previousStyle
is coming from — is that something you added?
Can you post a snack showing the bug?
Thanks for your reply. I'm going to check it again.
After testing it again, I found that using the Android Emulator everything works fine. But the problem arises when I run it with react-native-web, which is when the reported error occurs.
Any tips?
Thanks again.
without seeing how you're using previousStyle
I can't offer any suggestions. No references to previousStyle
exist in this codebase.
Hey @tiagocpeixoto, have you tried downgrading react-native-reanimated
to version 2.2.3
? I had the same error in a different project, and downgrading the reanimated version solved the problem.
ah yep, it's an error with reanimated: https://github.com/software-mansion/react-native-reanimated/issues/2635