Skip to content

Commit 8fc6ada

Browse files
Fix methods reference in ScrollToErrorHookForm component
- Get methods from useRemixFormContext() instead of undefined variable - This fixes the remaining ReferenceError: methods is not defined - Now the component properly accesses form methods for reset and submit state
1 parent ce180af commit 8fc6ada

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/docs/src/remix-hook-form/scroll-to-error.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ const ScrollToErrorHookForm = () => {
6767
delay: 150,
6868
});
6969

70-
const { handleSubmit } = useRemixFormContext();
70+
const methods = useRemixFormContext();
71+
const { handleSubmit } = methods;
7172
const fetcher = useFetcher<{ message: string; errors?: Record<string, unknown> }>();
7273

7374
return (

0 commit comments

Comments
 (0)