Skip to content

Instantly share code, notes, and snippets.

@micimize
Last active March 24, 2019 20:26
Show Gist options
  • Save micimize/c02b444a20eb2a86d45a7f322b6654a4 to your computer and use it in GitHub Desktop.
Save micimize/c02b444a20eb2a86d45a7f322b6654a4 to your computer and use it in GitHub Desktop.
My myriad problems experienced with react-native (I last worked with RN Sep 10th, 2018)

preface

This is a slightly cleaned-up version of the venting I did while pulling my hair out over react-native issues. The state of using react-native might be getting better with the community restructuring and core-rewrite. So take these dated notes with a grain of salt.

summary

After months of struggling to port libraries and develop applications using react-native, I have to recommend trading the comfort and breadth of the react and javascript ecosystems for Flutter and dart if you're developing a mobile app.

react-native is buggy and slow (or at least very hard to make fast). Perhaps it can be blamed on the size of the community, but the project is managed in an almost adversarial style. Almost all issues are ignored until the bot closes them for being "stale". They get locked too, just to make sure the community can't communicate workarounds effectively.

Issues I personally encountered that significantly hampered my developement:

Other notes:

  • don't render a lot while navigating
  • significant attempts to contribute are largely ignored - a few contributors commented, but what looks to me like an attempt to dig into and improve the bridge (the most important performance bottleneck in RN) was left hanging without direction and almost garbage collected.
  • Expo is by-and-large an incredible project that makes RN DX better, but in my experience it still crashed randomly.
  • (I don't know if this was in reference to RN or expo): The app crashes regularly, seemingly at random. Sometimes this crash is just a white screen. There are frequent unintelligble errors that crop up that are only resolved by restarting the app
@micimize
Copy link
Author

To extrapolate/contextualize my experience:
After having built one nativebase / react-native(-web) app, I decided to try something more ambitious. My execution strategy was to prototype my new application with react web, and then ported whatever we were depending on that wasn't react-native compatible to RN.

However, once we actually got the point where we were developing with react-native on-device, everything was unacceptably slow. My co-developer started building small test samples for performance. This is absolutely what I should have done initially, don't take any software's robustness on faith, no matter how many github stars they have. With much struggling we were able to get one of these tests to render near-acceptably fast by providing random keys every render.

Meanwhile, my profoundly insightful co-developer was prototyping the UI in Flutter. We have never had any performance problems with Flutter, DX is amazing, and the development team is way more involved and responsive to the community.

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