r/reactnative • • Apr 18 '20

The React Native 10 commandments

  1. Thou shalt never upgrade a react native version without at least having 72 hours of dedicated time.

  2. When you can't figure out what's wrong then delete node_modules, delete Pods, delete DerivedData, delete cache, and rebuild everything.

  3. Something running perfectly on ios has a 50% chance of being laggy on android.

  4. Every library added to your project will break your build at some point in the future.

  5. Never install a library that hasn't been updated in the last 6 3 months.

  6. The answer to your question is in a closed github issue.

  7. Don't be afraid to get into the native code and make changes.

  8. Native code is a frightening place, only make changes as a last resort.

  9. If you close your eyes before running a build command it has a 25% higher chance of building successfully.

  10. All changes made to the native build systems will be forgotten until it breaks your build at a later date.

385 Upvotes

55 comments sorted by

View all comments

12

u/Tayk5 Apr 18 '20

Oh man, this makes me concerned about choosing to learn RN over Flutter. Are there any Flutter devs here willing to share your Flutter experiences versus RN?

10

u/ncuillery Apr 19 '20 edited Apr 19 '20

I work with RN for 4 years, then switch to Flutter these past 6 months. My honest opinion is: Flutter is superior on every aspect. Expect maybe the syntax (I miss JSX a lot), but navigation, integration testing, hot reload,... are way better in Flutter.

I lost faith in RN upgrade after upgrade... Point 1 to point 6 are the damn truth, even for a experienced dev like me.

Oh, and Dart offers a very similar experience as JavaScript + TypeScript except it's built-in into the language. So no library with unsync or inexistant type definitions...

2

u/drink_with_me_to_day Apr 19 '20

Flutter = Flash

1

u/ncuillery Apr 19 '20

Hmmm, not sure what you mean

4

u/drink_with_me_to_day Apr 19 '20

Since Flutter renders everything with its own engine, it's analogous to Flash.

Or similar to releasing an UI framework for Unity. Or Adobe Air. It's just painting everything on it's own.

4

u/verylevelheaded Apr 20 '20 edited Apr 20 '20

I like that it is painting everything. You actually have one codebase and not one pointing to two other underlying codebases. The Flutter apps I've been downloading are night and day better feeling/performance wise.

1

u/drink_with_me_to_day Apr 20 '20

Well, that brings with it a slew of different issues that you might not face, but when you do you can't fix them and they won't be fixed.

There are always tradeoffs