Created
November 3, 2019 10:44
-
-
Save indreklasn/18f0948df1d8d199d814c39aea5e3fc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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