function Counter() { const [value, setValue] = useState(0); return ( <> <div>Counter: {value}</div> <button onClick={() => setValue(value + 1)}>Increment</button> <button onClick={() => setValue(value - 1)}>Decrement</button> </> ) } Closer to the DOM Preact provides the thinnest possible Virtual DOM abstraction on top of the DOM. It builds on stable platform features, registers real event handler