An experimental way to verify changes to React Native. This project provides a test app that is directly linked to the react-native and react-native-cli projects. This lets you make changes to React Native and see the results immediately.
Disclaimer: This has only been tested on Android
git clone https://github.com/nhunzaker/ReactNativeTestPlan
cd ReactNativeTestPlan
git submodule update --init --recursive
For these instructions, I'll use my Github handle and fork of React Native, but you can replace them with your own:
git remote add nhunzaker git@github.com:nhunzaker/react-native.git
git fetch nhunzaker
git checkout nhunzaker/master # or whatever your branch is
cd ../react-native-cli
git remote add nhunzaker git@github.com:nhunzaker/react-native-cli.git
git fetch nhunzaker
git checkout nhunzaker/master # or whatever your branch is
Then execute:
yarn install
This is pretty involved. Please help if you know of a way to make this simpler.
- Install Buck
- Open React Native in Android Studio
- Install the Buck Plugin for Android Studio
- Make sure that the ADB and Buck paths are set in Settings > Tools > Buck
- Download Android NDK Version 17 from here
- Extract the NDK to your computer. I put it under
~/Android/android-ndk-r17c
- Open local.properties and add:
ndk.dir=<ENTER_YOUR_PATH_HERE>/android-ndk-r17c
- Click Build > Make Project
- Now open the test app android project (
<root>/android
) - Open local.properties and add:
ndk.dir=<ENTER_YOUR_PATH_HERE>/android-ndk-r17c
- Click Build > Make Project
Then take a deep breath. You did it. Now let's install the rest of the dependencies:
yarn install
yarn build-react-native
This will make a special Android Library file that gets pulled into the test React Native app. You can now run your app:
yarn start
yarn run-android