How to Deploy a React App with Firebase Hosting

Deploy your app in 5 minutes or less — a step by step tutorial.

Jake Richards
The Startup

--

How to Deploy a React App with Firebase Hosting

Getting Started

In this tutorial, I will be demonstrating how you can deploy your React app using Firebase Hosting. I will assume that you already have a Firebase project set up. If you do not, you can create one using the Firebase Console.

You will also need to ensure have a React app created. For this, I will use Create React App. You can create a new React app by running the following:

npx create-react-app firebase-hosting-demo

Install Firebase Tools

Next, you will need to install the firebase tools that will allow you to deploy your app. You can install the tools by running the following:

npm install firebase-tools -g

Login to Firebase

You will now need to login to Firebase in your terminal. You will be prompted to enter your email and password if you’re not already logged in. Also, make sure that you are inside of the root directory of your React app. For me, it’s ~/firebase-hosting-demo. Run the following:

firebase login

Initialize Firebase in Your React…

--

--

Jake Richards
The Startup

Hey, I’m Jake — a Software Engineer. My passion is transforming ideas into reality through coding.