Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created November 3, 2019 10:44
Show Gist options
  • Save indreklasn/18f0948df1d8d199d814c39aea5e3fc2 to your computer and use it in GitHub Desktop.
Save indreklasn/18f0948df1d8d199d814c39aea5e3fc2 to your computer and use it in GitHub Desktop.
import { html, define } from 'hybrids';
export function increaseCount(host) {
host.count += 1;
}
export const SimpleCounter = {
count: 0,
render: ({ count }) => html`
<button onclick="${increaseCount}">
Count: ${count}
</button>
`,
};
define('simple-counter', SimpleCounter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment