Often, we do not put much thought into naming a project when we start it off. But later, especially when trying to make a distribution-ready application, we want a good, catchy name for our app. In React Native, it is not very clear as to how we can change the name of our application. Here is how you can do it:
- Make a backup of any files you made changes to inside your
- Remove both these directories.
app.jsonfrom the project’s root directory and change the value of the key called
displayNameto whatever you want the name of your application to be.
- Run the command
react-native ejectat your project’s root directory. This command will create the
- Replace the files that you backed up before removing the two directories.
Done! You have changed your app name!