/
githubmirror
/
react-hook-form
Обзор
Документация
Войти
/
githubmirror
/
react-hook-form
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/logic/isWatched.ts
15 строк
408 B
Bill
🛺 perf: make rhf more performant (#13524)
19 июн 2026, 12:41
Не верифицирован
19 июн 2026, 12:41
cee92e2
Код
Авторство
О чём код?
import type { InternalFieldName, Names } from '../types'; export default ( name: InternalFieldName, _names: Names, isBlurEvent?: boolean, ) => { if (isBlurEvent) return false; if (_names.watchAll || _names.watch.has(name)) return true; for (const watchName of _names.watch) { if (name.startsWith(watchName) && name.charAt(watchName.length) === '.') return true; } return false; };