Skip to content

Instantly share code, notes, and snippets.

@kalasjocke
Last active August 29, 2015 14:00
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 kalasjocke/5a96eba220c621e55205 to your computer and use it in GitHub Desktop.
Save kalasjocke/5a96eba220c621e55205 to your computer and use it in GitHub Desktop.
{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