Getting Started
Looking for an old documentation? As from now, it lives here: https://flatlogic.gitbook.io/react-native-starter/v/master/
What is React Native Starter?
We love building apps with React Native, because it helps us create high quality products for both major mobile platforms quickly and cost-effectively.
Getting started on a new app just takes too long. Most apps need the same basic building blocks and developer infrastructure, and we are bored of reinventing the wheel time and time again.
This Starter Kit reflects the best practices of React Native development we have discovered while building real-world applications for our customers. It is opinionated about tooling, patterns and development practices. It might not be a one-size-fits-all solution for everyone, but feel free to customize it for your needs, or just take inspiration from it.
More information about React Native Starter and downloads: https://reactnativestarter.com/
What's inside
Always up-to-date React Native scaffolding
UI/UX Design from industry experts
Modular and well-documented structure for application code
Redux for state management
React Navigation for simple navigation
Disk-persisted application state caching
More than 16 Ready-to-use Pages
Up and running (mac OS)
1. Clone and Install
2. Open RNS in your simulator
Then you can start the project by going to the project's folder and running there:
or, if you want to open it on Android:
Local images not rendered on iOS 14 physical device for release build
If you don't see images here is the fix that will help you until React Native package didn't add this on their end. Open node_modules folder and find this file Libraries/Image/RCTUIImageViewAnimated.m scroll to the line 270 and you'll find this pice of code:
change it to what you see below. Then restart project and clear cache, you may also try to build on different device.
Up and running (Windows)
1. Clone and Install
2. Look through official guide
3. If project is not running correctly
unable to load script make sure you are either running a metro server ....
Go to your root folder of the project > node_modules > metro-config >src > defaults >blacklist.js
.
Open said file (VS Code, etc) and on the top you will see a var called SharedBlacklist. Change that var from what it is to what attached code says
That's it! Cool, right?
Build project
You can generate a private signing key using keytool
. On Windows keytool
must be run from C:\Program Files\Java\jdkx.x.x_x\bin
.
Setting up Gradle variables
Place the
my-upload-key.keystore
file under theandroid/app
directory in your project folder.Edit the file
~/.gradle/gradle.properties
orandroid/gradle.properties
, and add the following (replace*****
with the correct keystore password, alias and key password),
These are going to be global Gradle variables, which we can later use in our Gradle config to sign our app.
Note about security: If you are not keen on storing your passwords in plaintext, and you are running OSX, you can also store your credentials in the Keychain Access app. Then you can skip the two last rows in ~/.gradle/gradle.properties
.
Adding signing config to your app's Gradle config
The last configuration step that needs to be done is to setup release builds to be signed using upload key. Edit the file android/app/build.gradle
in your project folder, and add the signing config,
Generating the release APK
Run the following in a terminal:
Also don't forget to run after you saved .apk file
check out official docs https://reactnative.dev/docs/signed-apk-android
Potential issue free vs full v.
If you cloned free version and started it locally, then bought full version and launched it on the same virtual device you may face the issue with set up, it may be caused by the naming collision, please update you virtual device or start brand new VD and run RNS on the new device.
Last updated