MCPcopy Index your code
hub / github.com/react-hook-form/react-hook-form / subscribe

Function subscribe

src/logic/createFormControl.ts:1379–1392  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

1377 };
1378
1379 const subscribe: UseFormSubscribe<TFieldValues> = (props) => {
1380 _state.mount = true;
1381 _proxySubscribeFormState = {
1382 ..._proxySubscribeFormState,
1383 ...props.formState,
1384 };
1385 return _subscribe({
1386 ...props,
1387 formState: {
1388 ...defaultProxyFormState,
1389 ...props.formState,
1390 },
1391 });
1392 };
1393
1394 const unregister: UseFormUnregister<TFieldValues> = (name, options = {}) => {
1395 for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {

Callers

nothing calls this directly

Calls 1

_subscribeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…