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

Function _removeUnmounted

src/logic/createFormControl.ts:726–738  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

724 };
725
726 const _removeUnmounted = () => {
727 for (const name of _names.unMount) {
728 const field: Field = get(_fields, name);
729
730 field &&
731 (field._f.refs
732 ? field._f.refs.every((ref) => !live(ref))
733 : !live(field._f.ref)) &&
734 unregister(name as FieldPath<TFieldValues>);
735 }
736
737 _names.unMount = new Set();
738 };
739
740 const _getDirty: GetIsDirty = (name, data) =>
741 !_options.disabled &&

Callers

nothing calls this directly

Calls 1

unregisterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…