Ruben Martinez Jr.
Ruben Martinez Jr.

Reputation: 3110

Execute Code After Meteor Helper Returns

I need something to work like a callback for a Meteor helper, such that it runs every time the helper updates/returns. I can't include it in the helper definition because a) it would run before the helper returns, and b) as far as I can tell that code only runs once. Similarly, the Template.foo.rendered callback seems to also only run once (not when the helper updates), and not even after the helper returns the first time. So, is there any way to execute code after a Meteor helper returns? The only thing I can think of right now is a timer, and that seems quite messy and wrong. Thanks!

Upvotes: 2

Views: 112

Answers (1)

Orbit
Orbit

Reputation: 2385

If the updated data is coming from a database, would using a observeChanges work?

Upvotes: 2

Related Questions