![Deploy React App using Firebase Hosting](/static/d30e43ead14b75d3e9b6989c1f6f626c/19188/react_firebase.png)
In this tutorial, I will share how to deploy React Application using Firebase Hosting. First of all, make sure that you already have React Application project. If not you can follow this tutorial.
Install Firebase tools and login to Firebase
Next step, go to your React Application project directory and inside the directory, you will need to install the firebase tools using:
And then after that login into Firebase using:
Initialize Firebase for React Application
After installing the Firebase tools and login into Firebase, proceed to initialize the Firebase inside your React Application project by using:
You will get some questions and choices in the process, just follow the steps below:
![](https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.11.43.png)
Choose Hosting: Configure and deploy Firebase Hosting sites.
![](https://blogs-hots-files.s3.amazonaws.com/images/2021/08/1_Rdcb0b-7PU7A69Ezd9hIaw.png)
Choose Use and existing project and then choose your firebase project.
![](https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.18.55.png)
Follow all the answers like what I did in the screenshot above. You can answer differently if you really know what you are doing.
![](https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.19.02.png)
Now that you have successfully initialized firebase in your React application, inside firebase.json make sure that it looks like the following:
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Deploying your React Application to Firebase Hosting
Now all you have to do is deploy your React Application into Firebase Hosting using:
Firebase will give you a unique URL where your deployed React Application is hosted on. That is all, congratulations! You have successfully deployed your React Application using simple and secure (securely hosted using HTTPS) Firebase hosting. If you want to learn how to create Firebase Cloud Function you can follow the tutorial here.