Questions tagged [react-redux-firebase]

200 questions
2
votes
1 answer

How to pass in a state to the doc property in firebaseConnect

I am creating my first react app and I need to add a particular document with an id similar to the user id from my firestore collection to my app state. I am using redux-firestore. Is there a way I can pass in a variable (user_id) from the state to…
jude ugwu
  • 51
  • 5
2
votes
2 answers

How to populate roles in firestore with react-redux-firebase package

So i'm using this package, and want to apply this reciept to populate data from collection called 'roles' in my firestore to my firebase/profile data in redux state. In this docs says, that my roles collection must be a sibling of users collection…
2
votes
1 answer

React-redux-firebase: Uncaught Error: Supplied prop/s "dispatch" are reserved for internal firebaseConnect() usage

I am using Routing recipe for users to be able to view/redirect between pages depending if user is logged in or not (https://github.com/prescottprue/react-redux-firebase/blob/next/docs/recipes/routing.md-react-routerv4+redux-auth-wrapperv2). When I…
2
votes
1 answer

How to load firestore subcollection to redux store?

I'm having trouble loading firestore subcollection in redux store. I'm trying to load respective subcollection inside the child component. The component structure looks like this: Dashboard --Project list --project summary --comments I have loaded…
2
votes
3 answers

How to migrate to v3 of react-redux-firebase

I trying to migrate my project from react-redux-firebase v2 to v3 with the new ReactReduxFirebaseProvider & createFirestoreInstance My code works as is now. But after the upgrade to react-redux-firebase v3, it's not. Im getting this error: This is…
Jonas Alvarson
  • 242
  • 3
  • 15
2
votes
1 answer

How to retrieve and load data from a Firestore subcollection using React-Redux-Firebase?

I want to fetch a document called settings from a Firestore subcollection, then load it into my local component (and Redux store) as a variable named settings with the following value: settings: { name: 'Waldo Garply', email:…
Let Me Tink About It
  • 11,866
  • 13
  • 72
  • 169
2
votes
0 answers

Set redux-firestore listener using FieldPath in query

I'm trying to set a listener with redux-firestore that queries firestore documents that has nested properties like this: users.USER_EMAIL.role. I need to be able to insert a variable in the where parameter of the query. I have done this previously…
2
votes
1 answer

How to correct error with React-Redux-Firebase in Redux store

I am trying to implement React-Redux-Firebase in a Redux store with the following code: store.js import { applyMiddleware, compose, createStore } from 'redux'; import reducers from 'store/reducers'; import thunk from 'redux-thunk'; import {…
Let Me Tink About It
  • 11,866
  • 13
  • 72
  • 169
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,176
  • 1
  • 15
  • 36
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,365
  • 1
  • 14
  • 25
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,130
  • 5
  • 22
  • 45
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,446
  • 2
  • 19
  • 28
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 2
3
13 14