TanStackT
TanStack3y ago
1 reply
sad-indigo

Basic Questions

Prefacing this with a note that I am new to front end development. Please excuse any terminology misuse. I have some general questions about the docs. For context using react.

Take this example from the quickstart docs:
https://tanstack.com/form/latest/docs/framework/react/quick-start

1. I notice in the quick start example a <form> tag is not used. But in the "simple" https://tanstack.com/form/latest/docs/framework/react/examples/simple example the tag is used, but the onSubmit element is being overriden to use the formApi hooks defined onSubmit function?

Does that mean including <form> Is optional?

2. Where can I find the definition for form.Provider?
3. form.Field can only have a single child component it seems? What if I want a label as well for the input?
4. Given how basic these questions are above, I'm worried i'm not using the docs too well. Is there some sort of hello world tutorial that introduces the form elements one by one?
The bare minimum to get started with TanStack Form is to create a form and add a field. Keep in mind that this example does not include any validation or error handling... yet.

`tsx
Quick Start | TanStack Query Docs
Was this page helpful?