State & events
useState and useMemo work the way you expect from React — but Kog has no
virtual DOM and no re-render. Each state change runs only the fine-grained
effects that read that value, and each calls exactly one native setter. In the
counter below, a tap updates just the two labels that read count, nothing else.
onPress is a plain closure that always sees current state — no dependency
arrays, no stale captures.
Tap +1 and -1 in the simulator. This is the shipped examples/counter
app, running the identical runtime it runs on a real board — imported here at
build time, not copied.
Next: lists →