NatUI
API

Renderer API

Reference createNatuiRenderer and the custom React renderer interface.

Prop

Type

function createNatuiRenderer(bridge: Bridge): NatuiRenderer

Creates a React 19 concurrent root backed by a NatUI bridge.

NatuiRenderer provides:

MemberPurpose
render(element, onCommitted?)Update the React root
unmount()Synchronously unmount and flush native removal operations
containerInternal root container and node-id allocator

Native events run at React's discrete event priority and synchronously flush work. That allows the bridge to determine immediately whether React adopted a controlled value.

Most applications should use run, which creates and coordinates the renderer, bridge, transport, handshake, window, and shutdown behavior.