Introduction: Firebase offers a suite of tools that can enhance your React applications. This cheatsheet provides a comprehensive guide to integrating Firebase with React. Key Sections: Installation: How to install Firebase and set up your project. npm install firebase Authentication: Implementing various authentication methods, including email/password and social logins. import { getAuth, signInWithEmailAndPassword } from… Continue reading Complete Firebase Cheat sheet in React JS
Tag: firebase
How to run the build application on the firebase using firebase emulator
Running a build application using Firebase Emulator involves several steps. Here’s a guide to help to set up and run your application locally with Firebase Emulator: Prerequisites Node.js and npm: Ensure that you have Node.js and npm installed on your machine. Firebase CLI: Install the Firebase CLI if you haven’t already npm install -g firebase-tools… Continue reading How to run the build application on the firebase using firebase emulator
Firebase server setup in Next JS
// src/firebase.js’; import { initializeApp } from ‘firebase/app’; import { getAuth, signInWithEmailAndPassword } from ‘firebase/auth’; import { getFirestore } from ‘firebase/firestore’; import { getStorage, ref } from ‘firebase/storage’; const firebaseConfig = { apiKey: import.meta.env.VITE_FIREBASE_API_KEY, authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN, projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID, storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET, messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID, appId: import.meta.env.VITE_FIREBASE_APP_ID, }; const firebases = initializeApp(firebaseConfig);… Continue reading Firebase server setup in Next JS
Hosting Next.js Applications on Firebase
Install Firebase CLI Tools: Open your terminal and install the Firebase CLI tools globally using the command. npm install -g firebase-tools Login to Your Account: Log in to your Firebase account from the terminal: firebase login Config Next.config.js file Add export command: /** @type {import(‘next’).NextConfig} */ const nextConfig = { output: ‘export’ } //Add this… Continue reading Hosting Next.js Applications on Firebase