React + React Router + Templates?



I am trying to build a webapp with React and React Router. I have the basics down on how to get the router working and now I want to include the Accounts package. How do I include the {{> loginButtons}} template in my React render?

Below are my example routes and Login Component, which obviously is incorrect.

Routes = React.createClass({
  getInitialState: function() {
    return {};
  render: function () {
    return (
      <Router history={ReactRouter.lib.BrowserHistory.history}>
        <Route path="/login" component={Login}/>
        <Route path="/signup" component={Signup}/>
        <Route component={App}>
          <Route path="/" component={Dashboard}/>
          <Route path="items" component={Items}/>

Login = React.createClass({
  render: () => {
    return (
            // how to include templates in React render function???
           {{> loginButtons}} 


I just had the exact same problem yesterday, solved it here:

Plus, you get to pass params to your blaze templates for free if you use my code too :smile:


Awesome, thanks! I will give this a shot.