I did some code in a snack (link I will provide now) with a library called react-native-swipe-list-view. This works nicely in Snack, but, the main problem occurs when I copy and paste this code into my app. It totally crashes with a red screen.
I have being implementing little by little and the error is the SwipeRow component of that library.
Is there a particular reason you’ve chosen this library rather than react-native-gesture-handler? That’s usually the one we recommend.
I’m not sure why this would work correctly in Snack, but not in an Expo project though. You may have to read through the docs a little more thoroughly- I believe <SwipeRow/> is generally used in a <SwipeListView/>
No, actually I didn’t knew about react-native-gesture-handler I will try to look into it, but anyway, the error is so strange, because I cannot find any reason why that Snack works and in my Expo project it does not. Can I use it with an standalone app? Because Expo documentation talks only about managed apps, which is not my case.
<SwipeRow /> can be used by itself, proof of that is that Snack which is an adaptation of the Snack the author of react-native-swipe-list-view did.
I had this problem also with another library for swiping call react-native-swipeout, whenever I an element of that library (eventhough it works also in Snack) it does not work…
I hope you could give me a solution.
I came to the conclusion that there is some kind of problem with an expo dependencie, because this problem also arraised whenever I use a component and I don’t remember to import it. Hope that help to figure out the problem.
We’re looking into why this would be different in Snack as opposed to trying to serve through the CLI. One difference is that Snack always runs in production- so it’s possible this error only surfaces in development