Answer the question
In order to leave comments, you need to log in
How to write MeteorJS and ReactJS in CoffeeScript?
Good day everyone. I started learning meteorjs and reactjs and got this problem. I can’t enter how to write react in coffeescript in meteor. Please throw guides or tutorials or explain how it's done.
The sequence of my actions:
head
title Todo List
body
#render-target
if Meteor.isClient
Meteor.startup ->
App = React.createClass
displayName: 'App'
render: ->
<div>Hi?</div>
React.render <App />, document.getElementById 'render-target'
if Meteor.isClient
React.render <App />, document.getElementById 'render-target'
App = React.createClass
displayName: 'App'
render: ->
<div>Hi?</div>
Answer the question
In order to leave comments, you need to log in
Required packages for CS:
coffeescript
jhartma:cjsx - a small tutorial
Official package for React:
also started with CS at first, but I think ES6 is better
How to write it in cjsx ?
renderTasks() {
return this.getTasks().map((task) => {
return <Task key={task._id} task={task} />;
});
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question