Upgrade React-native
Check current React Native version
react-native -v
Upgrade React Native version manually by this tool
https://react-native-community.github.io/rn-diff-purge/
or
https://react-native-community.github.io/upgrade-helper/
Delete cache and re-install packages
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
Build through Android Studio
Open project again from “Open” menu. Don’t use “Open recent” menu.
Duplicate a React Native app
- Setup new React Native app
- Copy scripts from package.json, install package relating to this script
- Copy Components, install package relating to this components
Leave a Reply