O'Reilly logo

Meteor: Full-Stack Web Application Development by Marcelo Reyna, Isaac Strack, Fabian Vogelsteller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Super helpers

In Meteor, you will quickly find yourself repeating helpers among templates for simple things such as formatting. We can prevent repetition by creating a global dictionary of functions—this is what we call a super helper. To do this, we are going to tap into Meteor's rendering engine—Blaze.

It is important to understand that Blaze is deeply integrated with Spacebars, and Spacebars is Meteor's updated version of HandlebarsJS. HandlebarsJS is a JavaScript templating engine that enables the use of helpers and components on the frontend using {{}}. This legacy means that Spacebars has a lot of the HandlebarsJS functionality. So, much of the documentation found in HandlebarsJS applies to Meteor helpers as well.

Defining a Blaze helper

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required