All Questions
9,159
questions
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 ...
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/...
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 ...
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: "#"...
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 ...
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'
},{
...
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....
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= ...
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(...
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: "...
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&...
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 ...
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 ...
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={...
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 ...