van-hmr/app.js
2025-10-30 10:57:16 -04:00

34 lines
549 B
JavaScript

const {DOM} = Gale(
{
Button:
{
padding: "2rem",
background: "black",
borderRadius: "20px",
color: "white",
fontWeight: "bolder",
":hover":
{
background: "red"
}
}
}
);
const state = vanX.reactive({key1:"value1", key2:"value2", count:4}, "counter");
console.log(state);
van.add
(
document.body,
DOM.div.Button
(
{
onclick()
{
state.count++;
}
}
, ()=>state.count
)
);