Skip to content

Instantly share code, notes, and snippets.

View devgioele's full-sized avatar

devgioele devgioele

View GitHub Profile
@devgioele
devgioele / useAugmentedFormContext.ts
Last active May 5, 2023 07:00
An extension of react-hook-form's `useFormContext`
import _ from 'lodash'
import { useRef } from 'react'
import {
FieldError,
FieldPath,
FieldValues,
useFormContext,
} from 'react-hook-form'
import { DistributivePick } from '../typescript/DistributivePick'