On the Homepage for Hyperscript, there is an example of using a component structured as:
<template component="click-counter"
_="init set ^count to 0">
<button _="on click increment ^count">+</button>
<span>Clicks: ${^count}</span>
</template>
<click-counter></click-counter>
<click-counter></click-counter>
which doesn't seem to work when I try it in the playground or my own file locally. It also differs from the examples within the Components section:
<script type="text/hyperscript-template" component="click-counter" _="set ^count to 0">
<button _="on click increment ^count">+</button>
<span class="label">Clicks: ${^count}</span>
</script>
<click-counter></click-counter>
<br>
<click-counter></click-counter>
On the Homepage for Hyperscript, there is an example of using a component structured as:
which doesn't seem to work when I try it in the playground or my own file locally. It also differs from the examples within the Components section: