docs
docs copied to clipboard
.changes() examples should include example outputs for includeState, includeInitial, includeOffsets
https://rethinkdb.com/api/javascript/changes/
Just discovered this and there should be some more examples as how to use this to properly maintain your own ordered data structure client-side (as well as other things)
The last example shows example output for includeState and includeInitial. I think we could add one more example that uses includeOffsets (and maybe the others, if necessary) to maintain a data structure, as described above — is there some existing sample code for that?
applyChange in horizon makes use of offsets. It's possible a simpler version of that would make a good example?
The fundamental approach for maintaining an ordered list based on the offsets is also described in the first post here: https://github.com/rethinkdb/rethinkdb/issues/5334#issue-129627568