4 ms·
Show HN: Coffee-React (JSX in CoffeeScript)
- couchand 12y agoThis is an interesting project, however I can't help but think it's unnecessary in CoffeeScript. For example the Neat component could be as simple as: {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.