How to Build and Deploy React App on Vercel

How to Build and Deploy React App on Vercel

Vercel

·

1 min read

Prerequisites

Steps

  1. Create an empty GitHub repository which can be public or private.

  2. Create a simple React app

     npx create-react-app vercel-react-app
     cd vercel-react-app
    
  3. Set Github remote origin URL.

     git remote add origin https://github.com/gitname/vercel-react-app.git
    
  4. Push the code changes to master branch.

     git add .
     git commit -m "Configure React app for deployment to Vercel"
     git push origin master
    
  5. Go to Vercel and import the project which is the above GitHub repository.

  6. Click on deploy and wait for a few seconds for the deployment to be completed.

  7. Now you can test the app deployed by hitting the below URL.

    Vercel App - https://vercel-react-app-eight-ebon.vercel.app/
    Repository - https://github.com/reevchris100/vercel-react-app/tree/master