mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-16 05:58:26 +02:00

* fix(import): ensure code convention compliance by importing React * fix(type): add generic type for useMemo
10 lines
270 B
TypeScript
10 lines
270 B
TypeScript
import * as React from 'react';
|
|
|
|
import { FormContext } from '../context';
|
|
import type { FormInstance } from './useForm';
|
|
|
|
export default function useFormInstance<Value = any>(): FormInstance<Value> {
|
|
const { form } = React.useContext(FormContext);
|
|
|
|
return form!;
|
|
}
|