To set the port of a React Native app, we can set the port
option when we run our app.
From the command line, we run
react-native start --port 9988
to set the port to 9988
In package.json, we can add the port by writing
{
"scripts": { "start": "react-native start --port 9988" }
}
to add the port option into the start script.