A
A
Amir Boziev2015-11-11 17:03:56
CoffeeScript
Amir Boziev, 2015-11-11 17:03:56

How to translate this code from JSX to CJSX?

renderTasks() {
    return this.getTasks().map((task) => {
      return <Task key={task._id} task={task} />;
    });
}

Source in JSX: Github

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
E, 2015-11-13
@AMRBZ

Well, as an option, read coffee-react ,
Put the linter in your "notebook" and see where the errors are, if you can't see the error yourself.

renderTasks: ->
  this.getTasks().map(task) => 
    <Task key={task._id} task={task}/>

Sandbox

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question