Reputation: 2599
In React Native, what is the difference between:
react-native-git-upgrade
react-native upgrade
yarn upgrade react-native
node_modules
, bumping the version number in package.json, removing yarn.lock or package-lock.json and doing an npm install
or yarn install
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
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:
Upvotes: 1