Fix/form ts error (#35394)

* Fix forwardRef type in the Form component

* Add changelog

* Revert type changes
This commit is contained in:
louwie17 2022-10-31 17:11:31 -03:00 committed by GitHub
parent 1b2a94b030
commit aea554bcdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Update variable name within useFormContext.

View File

@ -58,7 +58,7 @@ export const FormContext = createContext< FormContext< any > >(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function useFormContext< Values extends Record< string, any > >() {
const formik = useContext< FormContext< Values > >( FormContext );
const formContext = useContext< FormContext< Values > >( FormContext );
return formik;
return formContext;
}