deploy react app in github code example

Example 1: how to install gh-pages

npm install gh-pages --save-dev

Example 2: upload react project to github

Make sure you have already created a repo in github.
In "package.json" file of project add - "homepage": "https://username.github.io/reponame"
Run Install - "yarn add gh-pages"
In "package.json/scripts" add `"predeploy":"npm run build", "deploy":"gh-pages -d build"` 
Run "npm run build" to create the build
To push in git use following steps:
1) git init
2) git add -A
3) git commmit -m "first commit"
4) git remote add origin https://github.com/username/reponame.git
5) git push -u origin master
Now in github repo create a new branch "gh-pages"
In settings -> github pages -> source -> branch -> gh-pages -> save
Run "npm run deploy"
*****************************voilà it's done!!*************************

Example 3: how to run a cloned react native project

npm install --save github:facebook/react-native#master

Example 4: how to run a cloned react native project

...
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'de.undercouch:gradle-download-task:4.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
...

Example 5: how to run a cloned react native project

...
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation project(':ReactAndroid')

    ...
}
...