prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 556 forks source link

SET_PROFILE not getting referenced fields data for users profile #883

Open auahmed opened 4 years ago

auahmed commented 4 years ago

What is the current behavior?

I am using react-redux-firebase + redux-firestore.

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"

prescottprue commented 4 years ago

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