Show HN: Coffee-React (JSX in CoffeeScript)
github.com
github.com
{div, h1, p, br} = React.DOM
NeatComponent = React.createClass
render: ->
{showTitle, neat} = @props
div
className: "neat-component"
h1 null, "A Component is I" if showTitle
"Coffeescript really saves a lot of typing..."
for times in [1..10]
p null,
"is this component neat?"
br null
"#{neat}x#{times}"
Just as clean (if not moreso since you don't have to bother with closing tags), and it doesn't require any additional compilation.