In this tutorial iam gonna explain you how you can deploy you react application to firebase
Step 1: Create a Firebase Project
-
Go to https://firebase.google.com and click on Get Started
-
Proceed to click on Create a project.
-
Enter a project name and check yes if you wish to add analytics to your project.
-
Wait for the project to be created.
Step 2: Create react app or move to next step if you have already created one
npx create-react-app firebase-app
Step 3: Deploying to firebase
-
Run below command this will install firebase tool globally
npm install -g firebase-tools
-
Once firebase tool installed, Go to your react project folder path and run below command
//this is the command to authenticate firebase cli with firebase you can skip if you have already authenticated firebase login firebase init
-
After running above command you will see some options to select select the option as described below in screen shot
- Once above step completed run command
npm run build
firebase deploy