简体   繁体   中英

How does the Meteor.method Optimistic UI work?

Is this question duplicated maybe? I cannot find what I want from other answers.

My understands are

  • Methods runs twice. First on the client (this.isSimulation=true), next on the server.
  • The client has stub methods.

Questions are

  1. How can the client has stub methods? The client has built with server/main.js ? Or the server sends methods as strings?
  2. The client stub method has same imports/scopes with server?
  3. I've put some consone.log on a method. These are not printed on the client. Why?

You are right, it is a duplicate. All your answers are here: https://stackoverflow.com/a/30475494/7733460

Moreover, you can study further here: https://learn-meteor.netlify.app/ Specifically, go to Meteor/Core/4. RPC with Meteor Methods, chapter 7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM