Working with React-Native

In order to install React-Native framework, first create a container with the Node.js stack. Node.js has it's own package manager npm with which you will install the Expo CLI.

npm install -g expo-cli

Now that you have the Expo CLI installed, create a new project in your workspace:

expo init AwesomeProject

After the project is created, go to the project directory:

cd ~/AwesomeProject

To run React-Native application on a port run:

WEB_PORT=3001 yarn web

Once launched, you can preview your application with your container preview URL.

To run React-Native on your Android device add to your package.json under scripts:

“webtunnel”: “expo start --web --tunnel”

Run following command in terminal:

WEB_PORT=3000 npm run webtunnel