Last active
August 24, 2016 16:59
-
-
Save chrisvfritz/f3e76764c920325638fc to your computer and use it in GitHub Desktop.
This file contains 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
# Since React has made jQuery obsolete for me, I use $ to replace JSX. | |
window.$ = React.create-element | |
for key, value of React.DOM | |
window."$#key" = value | |
# And here's an example of a render function using this syntax. | |
render: -> | |
$ Jumbotron, style: styles.welcome.base, [ | |
$h2 key: \tagline, 'this is a catchy tagline' | |
$p key: \mission, 'here is a short mission statement, expanding on the tagline' | |
$a key: \demo-link, href: '/demo', do | |
$ Button, | |
bs-style: \primary | |
bs-size: \large | |
'Try the demo' | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment