Skip to content

Instantly share code, notes, and snippets.

@vincicat
Last active July 15, 2024 15:01
Show Gist options
  • Save vincicat/ddd9d8830e8f2645bcea0cb79b37b6fe to your computer and use it in GitHub Desktop.
Save vincicat/ddd9d8830e8f2645bcea0cb79b37b6fe to your computer and use it in GitHub Desktop.
React native caveats

Modal / BottomSheet

iOS: Open an Modal On/Off in short duration will "jam" the App - and no way to resolve it as the app stop to respond if the jamming occur (RN hide the error):

Warning: Attempt to present <UIViewController: [hash]> on <UIViewController: [hash] which is already presenting (null)

When using Modal presentation of react-navigation, beware any opened RN Modal - to avoid the issue, using pure JS overlay in those screens

Lottie

Android: Turn out Lottie is an heavy app which will have a chance of drop an screen update when switching the Animation Component.

Do: switch the mounted Player animation file instead of mount/unmount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment