You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, how are you replicating the updates on the store to your local pouch? Sorry if the question is off-topic, but I read you created this to work in a project you were considering pouch-redux-middleware. Since this will solve the pouch->state sync I'm wondering if you came up with something for state->pouch syncing.
The text was updated successfully, but these errors were encountered:
Manually put each document that is added to the live query and delete if it is removed. You can specify the _rev field and use force: true in the options to make sure the saved doc keeps the same rev as the original.
Use filtered replication with the new selector option. This will replicate all documents that match the query, but won't remove them when they no longer match. If you want documents removed, the above is probably better.
This is a good idea though, and I'd definitely welcome a pull request to implement selective replication with correct removal of docs that no longer match.
Hey @colinskow, sorry, I don't understand your answer. If something is added to the live query, I understand it's already on Pouch. Please clarify.
My main concern here is how to replicate something I do on my store to my local pouch instance. Let's say I add a new item to the store. When should I add it to pouch? Right now I'm adding an object to pouch first and just after receiving that in the live query I'm adding this object to the store. This was working fine, but now I started to think about some business rules and interactions of objects in the state and this is not working anymore.
I'm thinking about adding those objects to a queue on the state and persisting them on pouch by a middleware after the store is updated. But this would probably require me to add some extra state fields to my objects....
Please, how are you replicating the updates on the store to your local pouch? Sorry if the question is off-topic, but I read you created this to work in a project you were considering pouch-redux-middleware. Since this will solve the pouch->state sync I'm wondering if you came up with something for state->pouch syncing.
The text was updated successfully, but these errors were encountered: