facebookarchive / react-meteor

React rendering for Meteor apps
948 stars 114 forks source link

Document `templateName` and Blaze compatibility in the README #45

Open benjamn opened 9 years ago

benjamn commented 9 years ago

See #44 for past discussion.

In short, if you give your React component a templateName: "Something" property, then you can include that component in a Blaze template using the usual {{> Something}} syntax.

ChadMartinson commented 9 years ago

Blaze is returning "No such template Leaderboard". The error is in lookup.js 122

benjamn commented 9 years ago

You're probably using an older version of reactjs:react (current version is 0.2.1).

ChadMartinson commented 9 years ago

All I did was run meteor in this repo. I'll try updating it.

ChadMartinson commented 9 years ago

That worked thanks.

benjamn commented 9 years ago

Thanks for checking, and glad that's all it was :)

ChadMartinson commented 9 years ago

Give me a minute. I will do a pull request with all the examples updated.

liamzebedee commented 9 years ago

I'm still getting this error - would anyone be able to help? Cheers.

jazzdrive3 commented 9 years ago

Still getting this error myself. Using version 0.2.3.

liamzebedee commented 9 years ago

@jazzdrive3 I can't remember the specifics, but I've fixed it, and I needed to rename both the component and its variable name to be the same as templateName.

jazzdrive3 commented 9 years ago

Component name and variable is the same as my templateName. Still getting the same error, "no such template."

IonutLaceanu commented 9 years ago

For me, it works only when I use ReactMeteor.createClass. If, instead of that, I use React.createClass + mixins: [ReactMeteor.Mixin], I get the same error.

noresjo commented 9 years ago

I have the same experience as @IonutLaceanu . I don't know if that is a bug but I think the documentation could be clearer on this.

antoniopresto commented 8 years ago

Today I used the package as dependence, the installed version is 0.1.2, even the latest version being 0.2.4; so I got the same error. After using api.use (['reactjs: react@0.2.4']); everything worked normally. Try meteor update too.