mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
1719748a29
* chore: eslint add consistent-type-imports * fix avatar * Update Item.tsx
10 lines
267 B
TypeScript
10 lines
267 B
TypeScript
import { useContext } from 'react';
|
|
import { FormContext } from '../context';
|
|
import type { FormInstance } from './useForm';
|
|
|
|
export default function useFormInstance<Value = any>(): FormInstance<Value> {
|
|
const { form } = useContext(FormContext);
|
|
|
|
return form!;
|
|
}
|