mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 17:09:46 +08:00
10 lines
262 B
TypeScript
10 lines
262 B
TypeScript
|
import { useContext } from 'react';
|
||
|
import { FormContext } from '../context';
|
||
|
import { FormInstance } from './useForm';
|
||
|
|
||
|
export default function useFormInstance<Value = any>(): FormInstance<Value> {
|
||
|
const { form } = useContext(FormContext);
|
||
|
|
||
|
return form!;
|
||
|
}
|