How to host your ReactJs project on firebase.

Jack Sparrow
1 min readOct 11, 2021


Before explaining the process I am assuming that you have a firebase account set up. If not please set up an account and install the Firebase CLI.

  1. Go into the project directory and run these commands in the given order.
firebase init

2. After running the above command choose the Firebase Hosting option. (Not the GitHub one)

3. So if you have created a project on the Firebase then choose the existing project else go with the appropriate one.

4. Select the Project name if you have one in the Firebase.

Now the most important step where most developers mess up.

  • you have to write build as your public directory.
  • Then you have to say yes cause you are using react which is SAP.
You are almost done.
Need to run these two commands in order to deploy your React App.
  • npm run build (this will bundle up all the static data inside the build folder)
  • firebase deploy ( A single command :) to deploy your application)



Jack Sparrow

Web Developer + Android Developer + Traveller along with all this i love to tinker with new technology.