WhoBuilt

Let's upgrade our React Native project

Oct 9, 2019· 30 min· 3.7K views·Watch on YouTube

Speaker

Pavlos Vinieratos, who works at Sensa on the mental health app NiceDay, explains React Native upgrades at React Native EU 2019 with Callstack.

Why upgrades feel difficult

Vinieratos says React Native upgrades require work across JavaScript, iOS, and Android, including Xcode projects, Gradle scripts, and libraries with native code. Expo can avoid native work at first, but apps that need an unsupported native feature may have to eject. He notes that React Native releases used to arrive every two weeks, then monthly, and later around major features.

Tools for comparing versions

Vinieratos describes rn-diff-purge as a collection of generated diffs that lets developers compare any starting version with any destination version. The Upgrade Helper presents those changes in a web interface with file-by-file diffs, notes, and links to release information. The `npx react-native upgrade` command can apply changes, but template diffs may fail when a project has different files or customizations.

A careful upgrade workflow

Vinieratos recommends reading release notes, trying the CLI, and using Upgrade Helper to review changes one file at a time. He suggests handling package and configuration updates first, then reviewing native files and checking whether template files apply to the app. Developers should confirm their custom setup and libraries support the target version, then test the application.

Handling native project changes

Vinieratos demonstrates copying relevant Android and iOS changes while skipping files that a project does not use. He calls the Xcode project file especially difficult: generated IDs vary, so developers should focus on meaningful names and project structure rather than copying IDs exactly. He recommends asking an iOS teammate for help when that file changes.

Upgrade steadily and share feedback

Vinieratos advises doing easy changes first, choosing only the changes relevant to the app, and upgrading regularly when possible. If a team has fallen several months behind, he suggests moving one version at a time or at least one minor version at a time. He says upgrades have become more specific and manageable, while inviting developers to report problems and contribute fixes.

Takeaways

  • Review version diffs file by file so you understand which template changes apply to your app.
  • Check native libraries and custom configuration for compatibility before upgrading.
  • Test the app after applying changes, including native builds and existing tests.
  • Keep upgrades manageable by avoiding long gaps or moving forward in smaller steps.
  • Ask teammates with iOS or Android experience to review difficult native project changes.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks