hyperapp actions
hyperapp actions
HTML
<script src="https://unpkg.com/hyperapp"></script>
<div id="app">
</div>
Babel + JSX
const { h, app } = hyperapp
/** @jsx h */
const state = {}
const actions = {}
const view = () => (
h('svg', {width: '200', height: '200'}, [
h('image', {
'xlink:href': 'https://placekitten.com/200/200',
x: 0,
y: 0,
width: 200,
height: 200
})
])
)
app(state, actions, view, document.getElementById("app"));