Pick an example to open it full screen, with the live preview and its source side by side.
A component is a plain function. Each Counter() call keeps its own count.
Counter()
import 'nuclo' function Counter(label: string) { let count = 0 // one per call return button(() => `${label}: ${count}`, { onClick: () => { count++; update() }, }) } export const Counters = () => div(Counter('A'), Counter('B'))