Using Blaze Template helper

HI,

As example if have this Package https://atmospherejs.com/tap/i18n installed

but now

i have no idea how i can access the Template Helpers from my React Component?

thx :smiley:

1 Like

You’ll need to call Blaze.renderWithData and then pass in the template name and params. Here’s a start that renders Blaze templates into React but doesn’t do it with data: https://github.com/jedwards1211/meteor-webpack-react/blob/master/app/components/BlazeTemplate.js

I’ve been wanted to open source a helper that does this but haven’t had the time. Just change it to renderWithData and you should be good to go.

I’m not sure what Meteor specific features it has outside of templates but you might want to look at React internationalization components too.

1 Like