React Native – How to Update Expo SDK
This short and concise article guides you through upgrading your Expo SDK. Make sure you read the Expo changelogs carefully to know whether there are breaking changes.
To avoid unexpected errors, you should use Node LTS (long-term support) instead of the current version (which may not be stable and compatible). The best way to update Node.js is to go to https://nodejs.org, download the LTS version then run the installation file as normal software.
Updating Expo CLI
Upgrading to the latest version of Expo CLI by executing the following command:
npm i -g expo-cli
If you’re using a Mac, you might need to run the command with “sudo”:
sudo npm i -g expo-cli
Updating Your Existing Project
If you have a project created by the previous version of Expo CLI, you need to run the following command at the root of this project:
If you built a standalone app previously, remember that you’ll need to create a new build to update the SDK version. Run expo build:ios or expo build:android when you are ready to submit a new build to stores.
Updating Expo Go app
If you use iOS simulators and Android emulators for development, remove the existing Expo Go apps. Expo CLI will automatically create new ones when you run your project.
If you have an Expo Go app on your phone, update it through Google Play or App Store.
We’ve gone through the steps to update Expo so that you can get the benefits from the latest features provided by the SDK. Continue exploring more about React Native by taking a look at the following articles:
- How to Create a Confirm Dialog in React Native
- Using Image Picker and Camera in React Native (Expo)
- How to render HTML content in React Native
- How to implement tables in React Native
- Top 4 free React Native UI libraries
You can also check our React topic page and React Native topic page for the latest tutorials and examples.