First things first, you're going to need to get setup so you can compile and run a React Native app. Follow the instructions
at https://reactnative.dev/docs/environment-setup for your computer's OS (Windows/Mac)
and your mobile device's OS (iOS/Android). Make sure you selct React Native CLI Quickstart
(not Expo CLI Quickstart
). Follow that
guide until you reach the "Creating a new application" heading.
Once everything is setup you can clone this repository (or download the files) and you'll be ready to run this demo app.
Option 1: Clone this repo
Open your command line and move to the directory where you want to store the files:
cd [DIRECTORY NAME]
git clone https://github.com/JeffreyHyer/react-native-demo-app.git
That will create a new directory called react-native-demo-app
with the files inside it.
Option 2: Download the files manually
If you don't have git
installed or the above commands didn't work you can download the files directly from this link:
https://github.com/JeffreyHyer/react-native-demo-app/archive/refs/heads/main.zip
Now you just need to install all the apps dependencies and start it up.
If you have Yarn installed, run this command in the terminal:
yarn install
If not, you can run:
npm install
They both do the same thing so just pick one.
Once that's done running you're good to go. Run this command to get your app running on either iOS or Android:
npx react-native run-android
npx react-native run-ios
There's a lot going on here so you'll want to have some documentation links handy:
React Native: https://reactnative.dev/docs/getting-started
Javascript: https://devdocs.io/javascript/
React Native Express: https://www.reactnative.express/ this is a great resource for learning the ins and outs of React Native. As you get further into your app development this will be a useful resource for learning "the right way to do it".