MCPcopy
hub / github.com/react-hook-form/react-hook-form / reset

Function reset

src/logic/createFormControl.ts:1822–1828  ·  view source on GitHub ↗
(formValues, keepStateOptions)

Source from the content-addressed store, hash-verified

1820 };
1821
1822 const reset: UseFormReset<TFieldValues> = (formValues, keepStateOptions) =>
1823 _reset(
1824 isFunction(formValues)
1825 ? (formValues as Function)(_formValues as TFieldValues)
1826 : formValues,
1827 { ..._options.resetOptions, ...keepStateOptions },
1828 );
1829
1830 const setFocus: UseFormSetFocus<TFieldValues> = (name, options = {}) => {
1831 const field = get(_fields, name);

Callers 15

_resetDefaultValuesFunction · 0.85
FieldArrayFunction · 0.85
AppFunction · 0.85
ComponentFunction · 0.85
TestFunction · 0.85
AppFunction · 0.85
ComponentFunction · 0.85
AppFunction · 0.85
AppFunction · 0.85
ComponentFunction · 0.85
handleClickFunction · 0.85
FieldArrayFunction · 0.85

Calls 1

_resetFunction · 0.85

Tested by 15

FieldArrayFunction · 0.68
AppFunction · 0.68
ComponentFunction · 0.68
TestFunction · 0.68
AppFunction · 0.68
ComponentFunction · 0.68
AppFunction · 0.68
AppFunction · 0.68
ComponentFunction · 0.68
handleClickFunction · 0.68
FieldArrayFunction · 0.68
AppFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…