Skip to main content

All Questions

Tagged with
185 votes
12 answers
199k views

Why is my React component is rendering twice?

I don't know why my React component is rendering twice. So I am pulling a phone number from params and saving it to state so I can search through Firestore. Everything seems to be working fine except ...
Raul Sanchez's user avatar
  • 1,919
99 votes
28 answers
184k views

firebase.auth is not a function

I am using Webpack with firebase and firebase-admin. To install firebase I ran: npm install --save firebase I am importing firebase using: import * as firebase from 'firebase/app' import 'firebase/...
Eric Conner's user avatar
  • 10.7k
87 votes
6 answers
221k views

How to solve Warning: React does not recognize the X prop on a DOM element

I'm using a thing called react-firebase-js to handle firebase auth, but my understanding of react and of the provider-consumer idea is limited. I started with a built a very big JSX thing all at ...
user1272965's user avatar
  • 2,994
79 votes
6 answers
47k views

Warning: It looks like you're using the development build of the Firebase JS SDK

I've integrated Firebase into my React.js app as such: https://firebase.google.com/docs/database/web/start fire.js: import firebase from 'firebase' var config = { apiKey: "####", authDomain: "#"...
etayluz's user avatar
  • 16.3k
50 votes
10 answers
33k views

React-native bundling failure. ERROR MESSAGE: "While trying to resolve module 'idb'..... Indeed none of these files exist":

ERROR MESSAGE IN QUESTION: While trying to resolve module idb from file C:\Users\OG\Desktop\programming\react_native\mealstogo\MealsToGo2\node_modules\@firebase\app\dist\esm\index.esm2017.js, the ...
JohnyClash's user avatar
49 votes
5 answers
36k views

How to add multiple docs to a collection in firebase?

Im working with React native and react-native-firebase My objective is to add multiple docs(objects) to a collection at once. Currently, I have this: const array = [ { name: 'a' },{ ...
Kolby Watson's user avatar
47 votes
4 answers
16k views

Firestore to query by an array's field value

I'm trying to run a simple query, where I search for a document that contains a value inside an object array. For instance, look at my database structure: I want to run a query similar to this: db....
sisi mendel's user avatar
45 votes
6 answers
83k views

In Firebase when using push() How do I get the unique ID and store in my database [duplicate]

I am pushing data in firebase, but i want to store unique id in my database also . can somebody tell me,how to push the data with unique id. i am trying like this writeUserData() { var key= ...
komal deep singh chahal's user avatar
45 votes
3 answers
35k views

Where do I initialize Firebase app in React application?

I'm trying to integrate Firebase into my React app and after looking at various tutorials, I can't seem to find a consensus on where to put the firebase initialization code firebase.initializeApp(...
MarksCode's user avatar
  • 8,444
41 votes
11 answers
174k views

Module not found: Error: Package path . is not exported from package

import firebase from 'firebase' const firebaseConfig = { apiKey: "AIzaSyBOK7x5N5UnjY4TDqndzH7l5tvdNIsWFRc", authDomain: "todo-app-e3cf0.firebaseapp.com", projectId: "...
Sairam S's user avatar
  • 429
38 votes
8 answers
63k views

How do I fix a Firebase 9.0 import error? "Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase')."

I am trying to implement firebase in my React application but it seems my version of importing is outdated. Here is my code: import firebase from "firebase/app"; import "firebase/auth&...
aaronbiscotti's user avatar
37 votes
13 answers
34k views

Blank page after successful Firebase deployment

My ReactJs application runs fine on my local box, when I use the npm start command. However when I try to deploy my application using the firebase init to Firebase, I am seeing a blank page. What ...
Ajit Goel's user avatar
  • 4,358
37 votes
3 answers
24k views

Firebase listener with React Hooks

I am trying to figure out how to use a Firebase listener so that cloud firestore data is refreshed with react hooks updates. Initially, I made this using a class component with a componentDidMount ...
Mel's user avatar
  • 2,585
34 votes
9 answers
14k views

Firebase hosting with react router

I have a react app that uses react-router with a Router that looks like: <Router> <div> <Route exact path="/" component={Homepage} /> <Route path="/map/:uid" component={...
astrojams1's user avatar
  • 1,561
33 votes
6 answers
51k views

Async arrow function expected no return value

I'm building an application with Firebase oAuth. I followed all the instructions, but my code is returning an error saying that 'asyn arrow function expected no return value'. I saw that there are ...
Augusto Mallmann's user avatar

15 30 50 per page
1
2 3 4 5
611