Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
- Initialize React Native project in your WSL2 Linux with:
npx create-expo-app <PROJECT_NAME_HERE>
Simply follow official docs "Expo Go Quickstart": https://reactnative.dev/docs/environment-setup
-
Allow inbound and outbound traffic in your Windows Firewall on port
19000
. -
In PowerShell terminal of your WSL2 user find IP address:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Add whatever you want to your folder, and open it in the terminal. | |
2. Run: git init | |
3. Run: git remote add origin <repo_url> | |
4. Run: git fetch origin | |
5. Run: git checkout -b main origin/main |
Most of the instructions come from the official manual https://docs.nativescript.org/angular/start/quick-setup, but it is incomplete/wrong in some places. I have created an issue for NativeScripts documentation here: https://github.com/NativeScript/docs/issues/1890
sudo apt update