Meteor subscribe callback

后端 未结 3 1801
[愿得一人]
[愿得一人] 2020-12-04 16:02

According to this article here:

https://dweldon.silvrback.com/common-mistakes

Subscriptions don\'t block

Many aspects of the frame

3条回答
  •  盖世英雄少女心
    2020-12-04 16:20

    Maybe I don't get the question, but the Meteor.Subscribe function has callbacks named onError and onReady methods.

    Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

    From docs.

    For example.

    Meteor.subscribe("posts", {
      onReady: function () { console.log("onReady And the Items actually Arrive", arguments); },
      onError: function () { console.log("onError", arguments); }
    });
    

    Also check this GitHub issue

提交回复
热议问题