tanstack-form-composition

Solid

Migrate a React @tanstack/react-form codebase from the prop-drilled `useForm` + erased-form-type pattern to the official `createFormHook` composition API (`useAppForm` / `withForm` / `field.X`). Use when a project threads a `form` object (often cast to an `any`-erased type like `ReactFormExtendedApi<any,...>`) through field-wrapper components that take `form`+`name` props, and you want typed field names/values, no casts, and reusable bound field components. Triggers: "migrate forms to createFormHook", "adopt useAppForm/withForm", "remove AnyReactForm cast", "type-safe tanstack form fields".

API & Backend 67 stars 17 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# TanStack Form → composition API migration Convert a React project using `@tanstack/react-form` from **raw `useForm` + prop-drilled field wrappers + an `any`-erased form type** to the **`createFormHook` composition API**. The payoff: typed field names/values, deletion of the erased form type and every `as unknown as <ErasedForm>` cast, and bound field components consumed as `field.TextField` instead of `<FieldWrapper form={form} name=… />`. This is for the **React** adapter. Solid/Vue/Angular have the same API shape with different hook names - the concepts below port directly. ## When this applies The codebase has most of these symptoms: - An erased form type alias, e.g. `type AnyForm = ReactFormExtendedApi<any,any,…>` (12 `any` generics), used as a prop type and reached via `form as unknown as AnyForm`. - Field components that accept `form` + `name` props and internally render `<form.Field name={name}>…</form.Field>`. - Shared "section" components that receive the whole `form` as a prop and are reused across multiple parent forms (e.g. a settings form and an onboarding wizard). - Helper functions that take the `form` and call `getFieldValue`/`setFieldValue`. If the project does **not** yet use `@tanstack/react-form`, stop - this skill migrates an existing TanStack Form codebase; it does not introduce the library. ## Method Work in four phases. Do recon fully before editing; build the shared infra once; then migrate call sites; then delete the erased type and v...

Details

Author
suxrobGM
Repository
suxrobGM/jobpilot
Created
5 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

forms

Build or edit any form in a Next.js 16 App Router app through one shared toolkit in `lib/forms/`, with dirty + valid Save gating — on TanStack Form + Zod (default) or react-hook-form (auto-detected). Use when the user says "form", "edit panel", "create dialog", "settings page", "save button", "dirty state", or reaches for `useState` to hold field values, raw `useForm`, hand-rolled dirty tracking, or inline `toast.success/error` on submit. Also owns multi-step question flows — "questionnaire", "questionario", "survey", "sondaggio", "quiz", "poll", "onboarding flow", "intake form", "wizard", "step-by-step questions", "one question at a time" — which route to the shadcn `<Questionnaire />`. Refuses outside Next.js 16 web. Not for: React Native forms, search boxes that only filter, reads that populate a form (`data-fetching`), or state not bound to form fields (`state-discipline`).

6 Updated today
lukedj78
API & Backend Listed

formio-react

React framework implementor for the Form.io skill library — a router over three branches: build a greenfield React application around a Form.io project, add Form.io resource CRUD to a React application that already exists, or embed a single form. Targets Vite, React Router data routers, and `@formio/react`. Claims ONLY React-explicit triggers. Use when the user says "build it in React", "React front-end for this Form.io project", "use React", "use `@formio/react`", "the React skill", "add Form.io CRUD to my React app", "wire this Form.io project into my existing React app", or "embed a Form.io form in React". Not for: framework-agnostic app requests (see `formio-application`); planning a data model (see `formio-resource-planner`); framework-agnostic embed/render-a-form requests (see `formio-form`); Angular work (see `formio-angular`); REST endpoint lookups (see `formio-api`).

7 Updated yesterday
formio
Web & Frontend Listed

react-dev

This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned. Covers type-safe patterns for React 18-19 including generic components, proper event typing, and routing integration (TanStack Router, React Router).

0 Updated 5 days ago
dills122