Why helpers are registered in 2 different ways?

Why helpers are registered in 2 different ways in the following example?
Handlebars.registerHelper
UI.registerHelper

1 Like

No idea.

You may have already worked out that it doesn’t matter. In fact, they are the exact same function. If you compare them in the console you get:

> Handlebars.registerHelper === UI.registerHelper
<- true

In fact they are all the same:

> Template.registerHelper === Blaze.registerHelper && Blaze.registerHelper === UI.registerHelper && UI.registerHelper === Handlebars.registerHelper && Handlebars.registerHelper === Template.registerHelper
<- true
1 Like

Interesting hehe. Both “UI” and “Handlebars” are just there for backwards compatibility. That demo you’re looking at is very old.

“Template.registerHelper” is what you’re supposed to use according to the docs, but “Blaze.registerHelper” is the original :stuck_out_tongue:

1 Like

Any complete demo with public repo you can suggest that is more up to date ?

The todo apps from the turorials should probably be up to date I think.
https://www.meteor.com/tutorials
Althought the Blaze app hasn’t actually been updated in 2 years…