Remove `UIManager.setLayoutAnimationEnabledExperimental(true)` or make it optional
Closed this issue · 4 comments
Hi, and thanks for creating the library. It's very light and exactly what I needed.
However, since I added the library to the project, I started getting Android crashes.
I dug down in the code, and it seems like the following line causes them:
if (Platform.OS === "android") {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
I've not had a chance to look at this yet -- but are you saying this never works in Android? If you run the example app (eg. with an Android emulator), does it crash for you? The example app seems to run fine for me...
No, the tricky part is that it only crashes on some devices. It never fails on the simulator, but it crashes on real devices. I could reproduce it on a Samsung Galaxy phone, and I got numerous crash reports from Google Play store, which went away after I removed that line.
Ok - those lines are directly what's in the official React Native docs.
But I don't think we use LayoutAnimation
anymore, so I'll remove the lines.