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

2

u/osoese Apr 18 '20

6. The answer to your question is in a closed github issue. => suggesting a solution that breaks rule 5. Never install a library that hasn't been updated in the last 6 3 months. and forces you to use something that => rule 4. Every library added to your project will break your build at some point in the future.

and ofc expo is gonna update with breaking changes three versions ago so your work around isnt on it and this will happen the moment your 6 months coding spree starts to work and the day after you were too tired to build it last night. (true story for me)

...but I still love react native and even expo and ...

as a solid work around

...browserify with local import

good post

1

u/Tayk5 Apr 18 '20

The library could have been updated within the last 3 months but it could have a closed issue where someone fixed your issue by changing a config file or some other thing.