@hyperhooks/hyperhooks

0.0.4 • Public • Published

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.

Package Sidebar

Install

npm i @hyperhooks/hyperhooks

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

9.44 kB

Total Files

5

Last publish

Collaborators

  • hyperhooks