Skip to content

Commit 38c04c2

Browse files
committed
Replaces usages of React.useContext(...) with React.use(...).
1 parent 45be2c8 commit 38c04c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ui/form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const FormField = <
4343
};
4444

4545
const useFormField = () => {
46-
const fieldContext = React.useContext(FormFieldContext);
47-
const itemContext = React.useContext(FormItemContext);
46+
const fieldContext = React.use(FormFieldContext);
47+
const itemContext = React.use(FormItemContext);
4848
const { getFieldState, formState } = useFormContext();
4949

5050
const fieldState = getFieldState(fieldContext.name, formState);

0 commit comments

Comments
 (0)