facebookarchive / react-meteor

React rendering for Meteor apps
948 stars 113 forks source link

Allow Inserting of Blaze Templates into React Components #66

Open jazzdrive3 opened 9 years ago

jazzdrive3 commented 9 years ago

I would be great if we could do something in a React render function like , which would then render the loginButtons Blaze template.

In the RouteCore meteor package, they have library they have created called BlazeComponent at https://github.com/mystor/meteor-routecore/blob/master/blaze-component.js

Its a convention that makes sense. You would just do something like:

var LoginButtons = BlazeComponent('loginButtons');

React.render(<LoginButtons />, document.body);

Right now, its dependent upon the whole RouteCore package, but it would be great if we could somehow generalize this convention.

emdagon commented 9 years ago

I just created a simple component for including Blaze Templates -> https://gist.github.com/emdagon/944472f39b58875045b6