meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Optimistic UI & Method Locations #115

Closed Incisive closed 8 years ago

Incisive commented 8 years ago

The general method of accomplishing this is to define the methods on both the client and the server, but I'm only seeing it imported on the server portion of the code in this example, including the react branch.

Is this no longer necessary for optimistic updates?

Thanks!

tmeasday commented 8 years ago

The methods are imported at the place they are used on the client. For example: https://github.com/meteor/todos/blob/master/imports/ui/components/lists-show.js#L13-L18

Incisive commented 8 years ago

Thanks Tom, I wasn't aware that mdg:validated-method was a wrapper around Meteor.methods until looking up the package.

Thanks again!