Skip to content

Instantly share code, notes, and snippets.

@skrat
Created May 5, 2014 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skrat/43034000b60ae22ab66b to your computer and use it in GitHub Desktop.
Save skrat/43034000b60ae22ab66b to your computer and use it in GitHub Desktop.
`/** @jsx React.DOM */`
# The above line HAS to be the first line in the file for JSX to know to process it.
MySimpleComponent = React.createClass
render: -> `<pre>{this.props.mytext}</pre>pre>`
MyComponent = React.createClass
render: ->
`(
<ul>
{this.props.items.map(
function(item){
return (
<li><a href="#" onClick={_this.props.handleClick}>{item}</a></li>
)
}, this)
}
</ul>
)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment