# Develop React Native app with WSL and WSA ## Requirement - Windows Subsystem for Linux 2 ([WSL2](https://docs.microsoft.com/en-us/windows/wsl/install)) - Windows Subsystem for Android ([WSA](https://blogs.windows.com/windows-insider/2021/10/20/announcing-android-apps-on-windows-11-preview-for-windows-insiders-in-the-beta-channel/)) - NodeJS install inside WSL2 ## Steps ### WSA 1. Enable developer mode for WSA ![image](https://user-images.githubusercontent.com/11795757/138540977-c4f6f48a-a2b7-45e2-838d-3ff8d0942746.png) ### WSL2 This tutorial will run on Ubuntu 20.04 1. Install Android debug bridge (`adb`) ```bash $ sudo apt install adb ``` 2. Connect to WSA ![image](https://user-images.githubusercontent.com/11795757/138541424-70aac75a-3cc2-4ca6-802e-798ad679abf4.png) - Connect to WSA via IP ```bash $ adb connect ``` ![image](https://user-images.githubusercontent.com/11795757/138541436-4b15628d-1504-43b7-902f-de4536bdfb8e.png) - Make sure ADB connect successfully ```bash $ adb devices List of devices attached 172.19.99.153:5555 device ``` ### React Native setup I'll follow tutorial on [ReactNative.dev](https://reactnative.dev/docs/environment-setup) ```bash # Assuming that you have Node 12 LTS or greater installed, you can use npm to install the Expo CLI command line utility $ sudo npm install -g expo-cli # Then run the following commands to create a new React Native project called "AwesomeProject" $ expo init AwesomeProject cd AwesomeProject $ npm start # you can also use: expo start ``` Select `Run on Android device/emulator` in expo web client ![image](https://user-images.githubusercontent.com/11795757/138541943-10fb1fe4-fac2-4b49-b528-f9acc0f85229.png) ## FAQ