0.0.11 • Published 2 years ago
smllr v0.0.11
🦕 smllr
Frontend framework
Work in progress - not ready for production 🚧
const Counter = component(($) => {
const count = $.state(0);
const doubleCount = $.computed(() => count.value * 2);
return [
htm("div", null, "Count is: ", () => count.value),
htm("div", null, "Double count is: ", () => doubleCount.value),
htm(
"button",
{
onClick: () => {
count.value++;
},
},
"+"
),
];
});