Skip to content
A new experimental approach to Hyperscript and hooks
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
.npmignore
LICENSE
README.md
dom.js
hyper.js
package.json

README.md

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.

You can’t perform that action at this time.