Skip to content

Commit 19f761a

Browse files
docs: document type values for watch() callback (#1203)
1 parent 17674c7 commit 19f761a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/content/docs/useform/watch.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ Subscribe to field update/change without trigger re-render.
8585

8686
**Returns** object with `unsubscribe` function.
8787

88+
**Callback arguments**
89+
90+
The `type` argument indicates the originating DOM event (typed as `EventType`). For standard web inputs, this is `'change'` when a user updates a field. `type` is `undefined` when the change was triggered programmatically (e.g., via `setValue`, `reset`, or after `unregister`). See [`EventType`](https://github.com/react-hook-form/react-hook-form/blob/master/src/types/events.ts) for the full union (which includes React Native event types).
91+
8892
### Rules
8993

9094
---

0 commit comments

Comments
 (0)