Meteor - Cancelling a Server Method from the Client

前端 未结 2 1946
北荒
北荒 2021-02-13 22:51

I\'m performing a database count through a server method. Users can select how they want the count to be performed and then invoke the method.

My problem is that the cou

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-13 23:33

    Cancelling an already-made method call to server from client is not possible.

    But if your method are called multiple times in a short interval, and you only care about the last call's result. You could use debounce to delay execution for some times. This will help reduce unnecessary calls to server.

提交回复
热议问题