HyperHooks
A new experimental approach to Hyperscript and hooks
Quick start
require('hyperhooks/hyper.js') // hyperscript and hooks
require('hyperhooks/dom.js') // render to html
// Define our app
let App = () => {
const [count, setCount] = useState(0)
return h('div', undefined,
`Total 🍌🍌🍌: ${count}`,
h('button', { onPress: () => { setCount(count + 1) }, label: `Add one 🍌!` }),
)
}
// Render our app to the body
render(h(App), document.body)
Documentation
Head over to the main site for a more detailed introduction plus documentation.