function useField<TClient extends ViewClient, TValue>(view: TextFieldView<TClient>, field: BridgeField<NoInfer<TClient>, NoInfer<TClient>["snapshot"], TValue> | FieldDefinition<NoInfer<TClient>, NoInfer<TClient>["snapshot"], TValue>, options?: FieldOptions<TValue>): FieldHandle<TValue>; Binds an element to one View member while the component is mounted, through createFieldController: pass a generated descriptor such as EditorFields.title, or any definition with read and write. Spread inputProps on an <input>, <textarea> or <select> (a checkbox for a boolean field). Typing never loses characters: the field shows a draft while its writes are in flight, writes nothing during IME composition, keeps text that does not parse (such as 1. in a number field) as the draft, and once the last write settled shows the View's value. options are read when the component mounts; the descriptor's read, write and errors may close over render values, and the latest ones are used.
const editor = useView(page);
const title = useField(editor, EditorFields.title, { commit: "pause", checked: true });
<input {...title.inputProps} />
{title.conflict && <button onClick={title.retry}>Keep mine</button>}With checked: true a rejected or conflict receipt keeps the draft and sets error (a FieldError), and a conflict holds further writes until retry() or reset(). Unmounting writes a value that waits to be written.