React-Native Setup

When using React-Native CLI
---------------------------
Step to run Android Studio
- $ cd /home/archer/Application/android-studio/bin
- $ ./studio.sh

Step to execute the sample project
1. Terminal 1
- $ cd /home/archer/AwesomeProjecto
- $ npm start
Note: Wait until the android simulator app will show

2. Terminal 2 (in same path)
- $ npm run android
Note: Wait until the sample application "AwsomeProjecto" will be loaded inside the simulator.

When using Expo CLI (Framework that set on-top of React-Native)
---------------------------------------------------------------
$ npx create-expo-app company_payments-example
$ cd company_payments-example

We will using VScode as editor
------------------------------
$ code .

Notes: Helpful extensions are
1. React Native Tools -> for debugging

2. Expo Tools -> Expo VS Code for debugging (easy debugging)

2. React-Native/React/Redux snippets -> shortcut generating codes

3. Prettier - Code formatter

4. Material Icon Theme -> great icons for project.

To run the project in the VS code View > Terminal
-------------------------------------------------
$ npm start

Press a │ open Android

*Pre-requisite when open an Android: Make sure you already have Android Studio and created Mobile Virtual Device. Follow the standard installation. Make sure you also configured the ~/.bashrc and execute in your terminal "source ~/.bashrc" to update your user environment.

Build React Native Library

Following:

https://mcro.tech/blog/how-to-create-react-native-wrappers-for-native-sdks/

https://medium.com/mobile-learning/build-react-native-library-by-create-react-native-library-da64ad6e391a

PS C:\React\sample\sample_project_reactnative_sdk_wrapper> npx create-react-native-library company-sdk

Need to install the following packages:

  create-react-native-library@0.31.1

Ok to proceed? (y) y

√ What is the name of the npm package? ... react-native-company-sdk

√ What is the description for the package? ... Company Payment React SDK Wrapper

√ What is the name of package author? ... yourname here

√ What is the email address for the package author? ... support@company.com

√ What is the URL for the package author? ... https://www.company.com

√ What is the URL for the repository? ... https://svn.company.com

√ What type of library do you want to develop? » JavaScript library

✔ Project created successfully at sample-sdk!

Get started with the project:

$ yarn

Run the example app on iOS:

$ yarn example ios

Run the example app on Android:

$ yarn example android

Run the example app on Web:

$ yarn example web