-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding template support on top of jsx #46
Comments
I had this idea to, and we use this logic in the blaze component that all templates are based on, basically one also needs to pass down the component and the context (the data) for the template to work. Though I have some ideas on simplifying the templates for a React only approach. But also with Meteor the above strategy of single file code we need to either pick a new file extension or remove a package using one we want, I guess .jsx is the one we want in this case |
I think .jsx should work well. Even if we will have to remove BTW, I'm using .cjsx (for CoffeeScript), but it probably would be hard to have support for it :/ <template name="Page">
<div class="page">
<ul>
{{#each person in people}}
<li onClick={{this.clickEvent}}>Hello {{person.name}}</li>
{{/each}}
</ul>
</div>
</template>
class Page extends React.Component
mixins: [ReactMeteorData]
getMeteorData: ->
people: -> People.find()
clickEvent: ->
console.log('Hello world');
render: -> Template.Page |
This is the aim for the next release. |
I like initial ideas of components based Blaze2 and what Blaze Components try to do. React may be much better platform to that that Blaze. I understand that fist of all you wanted to make people more easy way of moving they apps into react so you wanted to be as stict with Blaze API as possible. Have you any plans to add components support into sideburns?
I'd like to have code like this:
Is it possible in any way?
The text was updated successfully, but these errors were encountered: