mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 07:39:36 +08:00
beeaf2d221
* docs: more about useWatch * test: Update test case * docs: more info * docs: more & more * feat: add useFormInstance * chore: add version info
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!;
|
|
}
|