UNPKG

create-vanjs

Version:

🍦 Quick tool for scaffolding your first VanJS project

15 lines (13 loc) 283 B
import van from "vanjs-core"; const Counter = () => { const { button } = van.tags; const counter = van.state(0); return ( button( { class: "btn", type: "button", onclick: () => ++counter.val }, "Counter: ", counter, ) ); }; export default Counter;