Questions tagged [react-redux-firebase]

192 questions
2
votes
0 answers

react-redux-firebase login promise resolving before auth state is updated, causing render troubles

I am using redux-form, react-redux-firebase, along with react-router-redux and react-router. When logging in a user with a redux-form connected form, in the onSubmit callback function, I am using the react-redux-firebase function from the…
GoreDefex
  • 1,461
  • 2
  • 17
  • 41
2
votes
1 answer

firestoreConnect Error: Collection is required to build query name

I'm trying to configure react-redux-firebase to work with redux-firestore. I followed the example setup from the official Docs and everything seems to work until i wire up a component with firestorConnect from react-redux-firebase. As soon as the…
Martin Reiche
  • 1,642
  • 1
  • 16
  • 27
2
votes
2 answers

React-redux-firebase loads data correctly but isnt available inside component

Following scheme from https://github.com/prescottprue/react-redux-firebase (go to Queries Based On Props paragraph). Code responsible for fetching data from the firebase: export default compose( firebaseConnect((props) => [ …
Patrickkx
  • 1,740
  • 7
  • 31
  • 60
2
votes
3 answers

Reactjs: Direct Firebase connection vs Firebase Redux store

Is it a good idea to access Firebase via a direct connection vs utilising Firebase in a store via Redux? I have some example code here to show how I implemented a direct firebase connection and used it to query data in a Component: import firebase…
2
votes
1 answer

Populate array in react-redux-firebase

react-redux-firebase supports replacing ids with the corresponding value in a lookup object – like a join – through a config object called populates (and later using a convenient mapping function inside mapStateToProps). Unfortunately, the…
dalgard
  • 3,614
  • 2
  • 22
  • 28
1
vote
0 answers

TypeError: this.props.fetchUser is not a function. (In 'this.props.fetchUser()', 'this.props.fetchUser' is undefined)

I'm using react native , redux and expo : My Main function is as follows: import React, { Component } from 'react' import { View, Text} from 'react-native' import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import {connect}…
1
vote
0 answers

Firebase Error: not working, what to do?

I am trying to create a ReactJs App and using Firebase, react-redux and react-redux-firebase for the first time as database and authentication. I am using and following the official documentation to create my redux store but I'm getting this weird…
And4Web
  • 84
  • 1
  • 8
1
vote
1 answer

How do you add data to firebase doc using redux thunk getFireBase and getFirestore from react-redux-firebase

Problem I'm having trouble adding data to the firebase database using react-redux-thunk I've checked the documentation and watched multiple youtube videos but keeping running into error after error I want to add data to a firebase doc using the…
1
vote
1 answer

react-redux-firebase and redux-firestore integration

each time it comes up with a new different error: example : "TypeError: Object(...)" or " Cannot call reactReduxFirebase() - TypeError: Object is not a function" I am new to firebase. and I am trying to integrate firebase with react, redux,…
1
vote
1 answer

Where should I put my logic for writing new data to Firestore?

I'm currently working on a project with React and Firebase and at the moment my logic to write new data to Firestore is directly in my components. I'm now also integrating Redux, for this I am using react-redux-firebase. My question is now, where is…
revilos
  • 13
  • 3
1
vote
0 answers

Redux-React-Firebase Mock Testing

I would like to test my action creator, which takes a task and adds it to firestore and then another also deletes it from firestore. How would I test this code. I assume I need to do some mocking, but i'm not quite familiar with testing action…
1
vote
0 answers

My 'users' collection doesn't appear in my console when I add useFirestoreForProfile and userProfile

I'm trying to extract user data when user is logged, but when is check my console specially firebase profile only appear me this, but I need to see user data from my "users" collection. this is my index.js const store = createStore( rootReducer, …
1
vote
1 answer

When Reloading by Browser[F5] then,a state always will be undefined

state.firebase.profile always is undefined when I reload by browser. Somehow, it goes well except for F5 as far as I can see. I check by using console.log("TEST HERE"+ JSON.stringify(this.props.profile.name));. Where should I modify it... class…
user14232549
  • 405
  • 4
  • 17
1
vote
0 answers

How should I modify React state? addDoc() called with invalid data

I would like to upload a image-file to storage of the firebase and put {title , content, createDate etc} in firestore. but it seems that state.upload file prevents putting it in firestore. this.setState({ uploadfile: "" }) The…
1
vote
1 answer

How to get a sub collection with firestoreConnect in React-redux project - Cloud Firebase

I am learning to react-redux-firebase with the tutorial below. I added sub-collection to collection. However, I don't know how to fetch subcollection. I need to get the original collection and its…