Skip to content

Instantly share code, notes, and snippets.

@matthewstokeley
Last active February 16, 2020 21:15
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 matthewstokeley/e0bd206eaa65a73dfa26755c0fbae519 to your computer and use it in GitHub Desktop.
Save matthewstokeley/e0bd206eaa65a73dfa26755c0fbae519 to your computer and use it in GitHub Desktop.
hyper boilerplate
const html = hyperx(hyperapp.h)
const model = 0
const click = model => model + 1
const actions = {click}
const view = (model, actions) => {
return html`
<div>
<h1>Clicked ${model}</h1>
<button onClick=${actions.click}>click</button>
</div>
`
}
hyperapp.app({
model,
actions,
view
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment