Last active
October 14, 2015 18:15
-
-
Save staltz/10e4e215cd8aeae1cb1a to your computer and use it in GitHub Desktop.
Hyperscript helpers 2.0 https://github.com/ohanhi/hyperscript-helpers
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
h('div.container', [ | |
h('label.nameLabel', 'Name:'), | |
h('input.myinput', {attributes: {type: 'text'}}), | |
h('hr'), | |
h('h1.greeting', `Hello ${name}`) | |
]) | |
// or | |
div('.container', [ | |
label('.nameLabel', 'Name:'), | |
input('.myinput', {attributes: {type: 'text'}}), | |
hr(), | |
h1('.greeting', `Hello ${name}`) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Like hiccup for Clojure, couldn't we just use