react-redux-firebase
react-redux-firebase copied to clipboard
SET_PROFILE not getting referenced fields data for users profile
What is the current behavior?
I am using react-redux-firebase + redux-firestore.
- have set my ReactReduxFirebaseProvider config
useFirestoreForProfile
to true anduserProfile
tousers
. - in the users collection in firestore if the document contains no references everything works great and
SET_PROFILE
from the package sets my users profile as expected. - make one of the fields in the
users
collection a reference rather then something like a string, now theSET_PROFILE
will set the users profile upon logon but will not contain the value itself for the field but still the reference.
What is the expected behavior?
In the above case, I think it's better to actually get the referenced data rather then the reference or whatever it might be. Just think that since in the firestore database its pretty much like a pointer but if i was to consume that data in the browser or a request, i would like to see the actual value rather then know its a reference somewhere else and need to self make a second call to it, kind of kills the reference link values. I can totally be wrong as well.
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?
"react-redux-firebase": "^3.1.2", "redux-firestore": "^0.13.0"
One of the things that redux mentions as a best pattern is to only store normal objects in the redux store, which is a reason that features such as this one haven't been supported.
That said, I'm wondering if it might work to pass non-normal objects from Firebase in the action, but just not store them in state. I'll leave open until more can be investigated around this