lightview
Version:
Small, simple, powerful web UI and micro front end creation ... Great ideas from Svelte, React, Vue and Riot combined.
26 lines (22 loc) • 595 B
HTML
<head>
<title>Lightview:Examples:Counter</title>
<script src="../../lightview.js?as=x-body" type="application/javascript"></script>
</head>
<body>
<p>
<button l-on:click="${bump}">Click count:${count}</button>
</p>
<script id="lightview">
(document.currentComponent||(document.currentComponent=document.body)).mount = async function() {
self.variables({count: "number",}, {reactive, set: 0});
self.bump = () => count++;
}
</script>
<style>
button {
margin: 20px;
background: gray
}
</style>
</body>
</html>