Do you want to request a feature or report a bug?
Bug.
I have a user document with nested photos collection.

On removing a photo from the user document, a redux firestore listener event is triggered with the following payload

What is the current behavior?
The user document is not updated with the payload
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.
Create a collection with a nested collection
Select a document
Delete an item from the nested collection of the document
The document does not get updated in the redux store
Sample Repo
File
Check deletePhoto function.
What is the expected behavior?
The user document should be updated and there should be one photo less.
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?
MacOS latest, Chrome latest.
+1.
The store is updated when I use arrayUnion method, but the store is not updated when I use arrayRemove method.
I also noticed that: firestore.data path is updated, but firestore.ordered is not! They are not same when remove method is used..
I think this is a duplicate of 115 on redux-firestore. Try using storeAs so that the data is not as deeply nested.
The v1.0.0 pre-releases (available on the alpha tag) may be of help. As described in the v1.0.0 Roadmap, the new versions store sub-collections at the top level along side collections in redux state since there were a number of issues reported with deep updates.
Hi @prescottprue,
I have now checked the docs, it also advises to use storeAs. I will check and get back soon.
+1.
I think my issue the same. Array field updates on the client (firestoreConnect) only when I add to it items. But not updates when I remove from it items.
In my case array field updates when I add to it new elements. But doesn't updated when I remove elements.
Hi @Aparus,
Using storeAs fixed the problem in my case. You should give it a try!
@pROFESOR11 , i didn't understand how to use storeAs ) but I fixed the problem with update redux-firestore to 0.7.1 version , which released about 2 weeks ago )
Going to close this since the newer versions of redux-firestore fix the issue, and it can also be worked around using storeAs. Thanks to all for input.