Contributing
Project Overview
Learn how instantdb-react-ui works under the hood
Forms
package/form/use-idb-form.tsx
, package/form/zod.ts
- Use
createEntityZodSchema
to create a zod schema from the entity and get default values - Use TanStack Form’s
useForm
hook to create a form with the zod schema validator and initial values - Get relation field picker data for relation fields
- Subscribe to database changes and update form values
- 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.