The guide below explains the setup that needs to be done prior to the workshop. React native apps can require a large setup time and the idea behind this doc, is to minimise setup time during the workshop.
This workshop requires you to have a github account, also its a good practice to start committing your own code to an online repository. If you dont have a Github account you can create one here.
Once that is dont ensure you have git command line tools. Those can be found below.
A detailed installation is in this link
apt-get update
sudo apt-get install git-core
brew install git
Download and install the git installer from this link.
Open a CMD
window and type the following
$ git config --global user.name "YourUsername"
$ git config --global user.email "youremail@gmail.com"
Alternatively you can also try a bash window like Gitbash.
Download the nodeJS package based on your operating system from here
To test if the installation has worked, open a terminal and type the following
which node
node --version
which npm
npm --version
If both the above commands give you outputs, implies your node and npm setup is complete.
Download and install the latest android studio from here.
Also ensure android tools and sdk is in your environment variables or in your path variables
You can read about that Here For Windows and Here for Mac
- Create a new Device in emulator Read this link
The official doc suggests using Create react native app. We will use the official React native cli so that there is no third party dependency.
npm install -g react-native-cli
We will create an app called AppName
react-native init AppName
cd into AppName
Ensure you have your emulator running, with developer mode on and usb debugging on. You can read about that here
Once you have your emulator running. cd into your folder
react-native run-android
Ensure you have your device connected, with developer mode on and usb debugging on. You can read about that here
Once you have your emulator running. cd into your folder
react-native run-android
Download and install from here. To run app on ios simulator run:
react-native run-ios
We have a nice article which will cover the above steps and a few more points here.