John D.
John D.

Reputation: 2599

Which is the correct method of upgrading React Native in your app?

In React Native, what is the difference between:

What is the preferred method, advantages/disadvantages? Are some outdated? Only relevant for certain versions?

I want to love React Native, but when it comes to versions, it is absolute hell. 0.44.1 is the only version that has consistently worked for me without random fatal errors on startup.

Upvotes: 2

Views: 497

Answers (1)

Vahid Boreiri
Vahid Boreiri

Reputation: 3438

As you can see in here in the official react-native document, the best way for upgrading react-native is using react-native-git-upgrade if you create your project with react-native init. If you started you app with create-react-native-app please read here.
Because React Native projects built with native code are essentially made up of an Android project, an iOS project, and a JavaScript project, upgrading can be rather tricky.
Advantage: The module react-native-git-upgrade provides a one-step operation to upgrade the source files with a minimum of conflicts. Under the hood, it consists in 2 phases:

  • First, it computes a Git patch between both old and new template files,
  • Then, the patch is applied on the user's sources.

Upvotes: 1

Related Questions