Created
May 5, 2014 11:50
-
-
Save skrat/43034000b60ae22ab66b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`/** @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