It there a way to know if local state is up to date to another vector?

Given a vector, is there a way to know if your current state has no changes since that vector (this is, that a call to encodeStateAsUpdateV2(doc, vector) would result in an empty update)?

Right now I’m getting the local vector and comparing (binary array wise) if the incoming vector and the local vector are the same, but I don’t know if that’s the best/fastest way.

You can compare two decoded vectors or two binary vectors (as you are doing) to detect if there are any differences. Binary comparisons are plenty fast. If they are the same, then there definitely is no change in state. If they are different, however, I think it is possible to have client updates cancel each other out or result in an empty delta (i.e. no change to the integrated data).

I don’t have much experience with state vectors though, so I could be missing something.

Thanks! Cancelling out changes are ok