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?

0

u/moneckew Apr 18 '20

Bruh, RN is the way. Amazing framework. Look at my app: https://moodflow.co

1

u/pelanggan Apr 19 '20

Wow look awesome man. How do you play video as the background of your screen like that? Looks super cool and performant

2

u/moneckew Apr 19 '20

People who say Flutter is the way clearly haven't spent enough time on RN. RN is easy to learn, specially if you come from webdev like me. Creating layouts is a breeze.

For the Video background just put a Video element with position absolute and zIndex: -1.

For performance make sure to enable Hermes as your JS engine. This has significantly sped up my app. As well as requiring Components as needed and not on app start using Inline Requires.

1

u/more-food-plz Apr 20 '20

They’re both useful and each with its own advantages

1

u/moneckew Apr 20 '20

Yeah sure, RN however has more support and is more mature.

1

u/asharpvan Apr 19 '20

If i may ask. What framework are you using for the charts?

1

u/moneckew Apr 19 '20

The one shown on the website is custom made and I use some react-native-svg-charts for showing pies

1

u/asharpvan Apr 20 '20

Alright. Ill go through the same. Thanks!