- Standard compliant React Native App Utilizing Ignite
# Install dependencies with `yarn`
yarn install
# Build and run for iOS
react-native run-ios
# Build and run for Android
react-native run-android
# Run standalone dev tools
react-devtools
Once the application is running, you can press '⌘D' in the simulator to open the debug menu. From here, you can access:
- Remote JS Debugging
- Live reload
- Hot Reloading
- ... and more!
You can specify the device the simulator should run with the --simulator
flag, followed by the device name as a string. The default is "iPhone 6"
. For exampel, if you wish to run your app on an iPhone 4s, just run react-native run-ios --simulator="iPhone 4s"
.
The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctl list devices
from the console.
This project adheres to Standard. Our CI enforces this, so we suggest you enable linting and auto-formatting to keep your project compliant during development.
The linting rules are from JS Standard and React-Standard. Regular JS errors can be found with descriptions here, while React errors and descriptions can be found here.
This project uses react-native-config to expose config variables to your javascript code in React Native. You can store API keys
and other sensitive information in a .env
file:
API_URL=https://myapi.com
GOOGLE_MAPS_API_KEY=abcdefgh
and access them from React Native like so:
import Secrets from 'react-native-config'
Secrets.API_URL // 'https://myapi.com'
Secrets.GOOGLE_MAPS_API_KEY // 'abcdefgh'
The .env
file is ignored by git keeping those secrets out of your repo.
- Copy .env.example to .env
- Add your config variables
- Follow instructions at https://github.com/luggit/react-native-config#setup
- Done!