Closed agronbajraktari closed 3 months ago
they don't, but there's a workaround which is to use onSnapshot (which only happens on transactions) and record patches on an array and "flush" them when onSnapshot callback gets called.
so something like:
const patches = []
onPatches -> patches.push(patch)
onSnapshot -> process patches array and set length to 0
@xaviergonz Understand. That's a nice workaround. Will try it. Thanks!
Currently I receive only singular changes in the onPatches listener even if i make batch updates to a map object. In a react component wrapped with "observer", it re-renders the component only once correctly given that I use @modelAction (or transaction). However the patches are fired 1-by-1. Is it possible to receive them batched?