// @jsx x import { x, atto } from "xatto" const down = (event, context) => ({ count: context.count - 1 }) const up = (event, context) => ({ count: context.count + 1 }) const view = ({ xa: { context }, ...attrs }, children) => ( <div> <h1>{context.count}</h1> <button onclick={down}>-</button> <button onclick={up}>+</button> </div> ) atto(view, document.getElementById("app"))({ count: 10 })
https://codepen.io/atomita/pen/pKwjKq
There was an error while loading. Please reload this page.