Last active
August 29, 2015 14:00
-
-
Save kalasjocke/5a96eba220c621e55205 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
{label, select, option, p, button} = React.DOM | |
p {}, "Some content" | |
buildTag = (tag) -> | |
(options...) -> | |
options.unshift {} if options.length is 1 | |
React.DOM[tag].apply @, options | |
DOM = (-> | |
object = {} | |
for element in Object.keys(React.DOM) | |
object[element] = buildTag element | |
object | |
)() | |
{h1, h2, h3, div, p} = DOM | |
p {className: 'foo'}, "Some content" | |
p "Some content" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment