Meteor.subscribe isReady called on all changes

$meteor --version
Meteor 1.8

I have a Meteor.publish(“xxx”) on server-side that just returns a cursor from a Meteor.Collection.find. On client-side I do Meteor.subscribe(“xxx”, … , { onReady: onReadyCallback}). Shortly after setup onReadyCallback is called on the client-side, after all the data from the cursor has been propagated to my client mini-mongo. That is as expected.

Now if I make a change on server-side-mongo, to one of the records included in the cursor, I will get another call to onReadyCallback, after the change has been propagated to client-side. I was not expecting that as https://docs.meteor.com/api/pubsub.html#Meteor-subscribe only says “The onReady callback is called with no arguments when the server [marks the subscription as ready]” and “marks the subscription as ready” says “Informs the subscriber that an initial, complete snapshot of the record set has been sent.”. I notice the word “initial”, and therefore do not expect onReady to be called on consecutive changes to the record set. I expected that I had to do an observe on a client-side mini-mongo-cursor, in order to get informed about the after-initial-snapshot changes to the record set.

Is it me who misread the semantics of onReady, or is it the implementation that is incorrect, or the documentation that is incorrect?

I’m using react and this is how I use subscribe

export default withTracker(() => {
  const returnObj = {
    data: null,
    loading: true,
  };
  let sub;
  if (Meteor.isClient) {
    sub = Meteor.subscribe('xxx', { some: 'data' });
  }
  if (Meteor.isServer || (sub && sub.ready())) {
    returnObj.loading = false;
    returnObj.data = SomeCollection.findOne({ some: 'conditions' });
  }

  return returnObj;
})(SomeComponent);

Thanks @minhna. What you do is cool’n’all, but it does not answer the question(s). I am using Angular, BTW, but I do not think there is anything web-framework-related in my question(s).