T
TanStack2mo ago
frail-apricot

"TanStack Form server error: Cannot access 'formOpts' before initialization"

Hi guys, I'm wondering why we cannot place content from utils/form-isomorphic.tsx directly in utils/form.tsx. I mean, when I did this i get an error during form submitting:
An error occured while server rendering /_serverFn/src_utils_login-form_tsx--handleForm_createServerFn_handler:

Cannot access 'formOpts' before initialization
An error occured while server rendering /_serverFn/src_utils_login-form_tsx--handleForm_createServerFn_handler:

Cannot access 'formOpts' before initialization
It works only when formOpts are imported to form from external file. https://tanstack.com/form/latest/docs/framework/react/examples/tanstack-start?panel=code
React TanStack Form Tanstack Start Example | TanStack Form Docs
An example showing how to implement Tanstack Start in React using TanStack Form.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?