Context and refs
Change units to update a nested consumer. Add to the child counter, then reset it through the handle exposed to its parent. The console records the mounted native widget handle.
A context provider is read at mount. To share a changing value, provide an accessor (value={() => units}) and call it inside the consumer's JSX. useReducer owns the counter and useMemo derives its doubled value. useCallback keeps familiar React syntax; component functions already mount only once in Kog.
forwardRef passes the parent's ref to the child, and useImperativeHandle exposes a small reset() API. useRef also holds the native root widget, which findNodeHandle converts to its numeric handle. useLayoutEffect logs after mounting; in Kog it has the same scheduling as useEffect. useId creates a stable identifier, and memo is an identity wrapper because components do not re-render.
See Hooks for mount-once semantics and cleanup behavior.