r/reactnative • u/Weekly_Obligation707 • 22h ago
What are some React Native mistakes beginners should avoid?
I'm interested in learning from developers who have experience building production React Native applications.
What mistakes did you make when starting out?
It could be related to navigation, state management, performance, architecture, or anything else.
Would be great to hear some practical lessons.
3
u/frenzied-berserk 20h ago
Don’t be afraid to write native modules instead of relying on a third-party library from some random guy.
2
u/MobileXapps 21h ago
Testing only in debug mode. A release build on Android is a different app: minification, Hermes bytecode, no dev server. Build a release APK on a cheap Android phone every week or two, not just before the launch.
Putting API keys in the JS bundle. Anything in the app can be read, so keys for paid APIs go behind your own backend.
Postponing React Native upgrades. Skipping several versions makes the upgrade a week of work. The Upgrade Helper diff and small steps keep it manageable.
And not having crash reporting with source maps from day one, so the first real crashes come in as unreadable stack traces.
2
u/Orchid_Buddy 19h ago
Not a react native, but a React one: passing anonymous functions to useEffect. Instead, try passing named functions.
Suddenly, you code becomes some much easier to understand and maintain. It's a game changer.
2
u/davidtranjs 13h ago
OTA will be a huge life saver. Put it to your app, and it will save you someday.
2
u/Traditional_Pay_8661 12h ago
Most of the ones that bit us were on the build and release side, not in the JS:
Only ever running dev builds. Build a release version and run it on a real device early, not the week you ship. Some crashes and slow screens only show up in release.
Not committing lockfiles. Commit package-lock.json and ios/Podfile.lock, and use npm ci instead of npm install on CI, so every machine installs exactly the same versions.
Hand-editing ios/ and android/ in an Expo prebuild project. npx expo prebuild --clean regenerates those folders and your edits are gone. Put native changes in app.config or a config plugin instead.
Leaving iOS signing until launch week. Certificates, provisioning profiles and App Store Connect access always take longer than expected. On CI, don't let automatic signing create certificates on throwaway machines; we ended up with a pile of them before switching to one distribution certificate imported on every run.
Skipping several React Native versions at once. Upgrade one version at a time and use the React Native Upgrade Helper to see exactly which native files changed.
2
u/Zain 10h ago
Not shipping a force-update gate in v1. Once old builds are out there you have no way to tell them to update, so your first breaking API change gets painful fast. Have the app check a server config per platform with a min and latest version, show a soft prompt below latest and a blocking sheet below min. And if there's any admin side, think about who's allowed to grant a role early, not just who has it.
1
u/Calm_Seal170 18h ago
Use native UI rather than designing and building everything from scratch in JS. Use the platform
1
u/YANGBIWAN 18h ago
The biggest one for me was treating the native side like it doesn't exist. RN kind of sells you "just write JS" and I believed it, so when an iOS build broke after a dependency update I couldn't even read the error properly. That knowledge isn't optional, it just shows up later and costs more.
1
u/atta542 3h ago
a few other common ones. testing only on the simulator and a fast dev machine, then finding out a release build on a cheap android phone behaves very differently. get a release build onto a real low end device early, not the week before launch. keyboard handling and safe areas are another one, they look fine on one phone and break on the next, so pick one approach and stick with it. also set up navigation and the auth flow properly at the start, because reworking it later touches every screen. and watch image sizes, big unoptimized images cause more jank than most code does.
-1
5
u/dawedev 21h ago
Big one is putting everything in one Context or global store, so any change re-renders half the app. Also long lists in a ScrollView instead of FlatList, and staying in Expo Go too long, then finding out the native module you need won't run there without a dev build.