flimflam57
flimflam57

Reputation: 1334

Correct way to write helper functions in Meteor

I'm new to Meteor and I'm trying to figure out the difference between writing:

Template.main.folks =
  function () {
    return Clients.find();
};

and writing it using "helpers":

Template.main.helpers({
  folks: function () {
    return Clients.find();
});

Are they the same thing?

Upvotes: 0

Views: 71

Answers (1)

Thai Tran
Thai Tran

Reputation: 9925

Nothing difference, but the first one is gonna be removed soon. If you do that, it still run, but will give you the deprecated warning

Upvotes: 1

Related Questions