Forms

package/form/use-idb-form.tsx, package/form/zod.ts

  1. Use createEntityZodSchema to create a zod schema from the entity and get default values
  2. Use TanStack Form’s useForm hook to create a form with the zod schema validator and initial values
  3. Get relation field picker data for relation fields
  4. Subscribe to database changes and update form values
  5. Return the form with custom modified types

TanStack Form library

Form state is managed using the @tanstack/react-form library with the useForm hook.

TanStack Form Docs

Read the reference for the useForm hook

Lists

package/list/list.tsx

Under construction.