React-Native-Australia-Boilerplate - RNAB
Welcome to React Native Boilerplate
React Native Australia Boilerplate is aimed for a quick start for your next new React Native application.
Currently using:
- Typescript
- react-navigation
- Functional Components
- Provider & Consumer
- useContext
git clone https://github.com/MarshalPaterson/React-Native-Australia-Boilerplate.git
cd React-Native-Australia-Boilerplate
Config
Copy the ‘api.json’ from the assets folder to a http server, for example “localhost” and replace the URL ‘const FETCH_URL’ in App.tsx
For NPM
To install:
npm install
To run:
npm run android
npm run ios
Lint
npm run lint
Unit Test
npm run test
For yarn
To install:
yarn
To run:
yarn android
yarn ios
Lint
yarn lint
Unit Test
yarn test
Troubleshooting
General cleaning helps
npm run theclean
yarn theclean
For iOS you need to run pods.
cd ios
pod install
For Android, it could help to have an Emulator running. Also, try running the project in the Android folder in Android Studio.
If you are getting a keystore error review this page https://github.com/facebook/react-native/issues/25629
If you are getting:
‘Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project’s local properties file at /Users/USERNAME/Documents/GitHub/React-Native-Australia-Boilerplate/android/local.properties’.
The solution can be found at https://stackoverflow.com/questions/32634352/react-native-android-build-failed-sdk-location-not-found
Also on the API call, you may need to add your IP address rather than localhost.
If you see improvements feel free to create a branch and then it can be merged back.
For renaming the boilerplate project this is an excellent tool: https://github.com/junedomingo/react-native-rename —
Our website: https://marshalpaterson.github.io/React-Native-Australia-Boilerplate/
Our group: https://www.linkedin.com/groups/13532424/
From Facebook: https://github.com/facebook/react-native | https://reactnative.dev/ |
Feel free to LinkedIn:
React Native Australia - Version 1.0.1 - MIT License