Skip to content

Commit d3883e9

Browse files
Balastronglachlancollinsharry-whorlowcrutchcorn
authored
feat: update start to rc (#1771)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Co-authored-by: Harry Whorlow <whorlowharry@gmail.com> Co-authored-by: Harry Whorlow <79278353+harry-whorlow@users.noreply.github.com> Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
1 parent 987d8ff commit d3883e9

File tree

103 files changed

+1485
-3662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1485
-3662
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
"baseBranch": "main",
1010
"updateInternalDependencies": "patch",
1111
"fixed": [
12+
[
13+
"@tanstack/form-core",
14+
"@tanstack/react-form",
15+
"@tanstack/react-form-start",
16+
"@tanstack/react-form-remix",
17+
"@tanstack/react-form-nextjs",
18+
"@tanstack/angular-form",
19+
"@tanstack/vue-form",
20+
"@tanstack/solid-form",
21+
"@tanstack/svelte-form"
22+
],
1223
[
1324
"@tanstack/form-devtools",
1425
"@tanstack/react-form-devtools",

.changeset/cruel-clubs-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/react-form': minor
3+
---
4+
5+
Update Start to Release Candidate version. Extracted start, remix and nextJs adapters to the respective libraries @tanstack/react-form-start, @tanstack/react-form-remix, and @tanstack/react-form-nextjs,

docs/framework/react/guides/ssr.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
2626

2727
```typescript
2828
// app/routes/index.tsx, but can be extracted to any other path
29-
import { formOptions } from '@tanstack/react-form'
29+
import { formOptions } from '@tanstack/react-form-start'
3030

3131
// You can pass other form options here
3232
export const formOpts = formOptions({
@@ -44,7 +44,7 @@ Next, we can create [a Start Server Function](https://tanstack.com/start/latest/
4444
import {
4545
createServerValidate,
4646
ServerValidateError,
47-
} from '@tanstack/react-form/start'
47+
} from '@tanstack/react-form-start'
4848

4949
const serverValidate = createServerValidate({
5050
...formOpts,
@@ -93,7 +93,7 @@ Then we need to establish a way to grab the form data from `serverValidate`'s `r
9393

9494
```typescript
9595
// app/routes/index.tsx, but can be extracted to any other path
96-
import { getFormData } from '@tanstack/react-form/start'
96+
import { getFormData } from '@tanstack/react-form-start'
9797

9898
export const getFormDataFromServer = createServerFn({ method: 'GET' }).handler(
9999
async () => {
@@ -106,13 +106,13 @@ Finally, we'll use `getFormDataFromServer` in our loader to get the state from o
106106

107107
```tsx
108108
// app/routes/index.tsx
109-
import { createFileRoute } from '@tanstack/react-router'
110109
import {
110+
createFileRoute
111111
mergeForm,
112112
useForm,
113113
useStore,
114114
useTransform,
115-
} from '@tanstack/react-form'
115+
} from '@tanstack/react-form-start'
116116

117117
export const Route = createFileRoute('/')({
118118
component: Home,
@@ -192,7 +192,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
192192
```typescript
193193
// shared-code.ts
194194
// Notice the import path is different from the client
195-
import { formOptions } from '@tanstack/react-form/nextjs'
195+
import { formOptions } from '@tanstack/react-form-nextjs'
196196

197197
// You can pass other form options here
198198
export const formOpts = formOptions({
@@ -213,7 +213,7 @@ Next, we can create [a React Server Action](https://playfulprogramming.com/posts
213213
import {
214214
ServerValidateError,
215215
createServerValidate,
216-
} from '@tanstack/react-form/nextjs'
216+
} from '@tanstack/react-form-nextjs'
217217
import { formOpts } from './shared-code'
218218

219219
// Create the server action that will infer the types of the form from `formOpts`
@@ -255,14 +255,13 @@ Finally, we'll use `someAction` in our client-side form component.
255255
'use client'
256256

257257
import { useActionState } from 'react'
258-
import { initialFormState } from '@tanstack/react-form/nextjs'
259-
// Notice the import is from `react-form`, not `react-form/nextjs`
260258
import {
259+
initialFormState
261260
mergeForm,
262261
useForm,
263262
useStore,
264263
useTransform,
265-
} from '@tanstack/react-form'
264+
} from '@tanstack/react-form-nextjs'
266265
import someAction from './action'
267266
import { formOpts } from './shared-code'
268267

@@ -327,7 +326,7 @@ Here, we're using [React's `useActionState` hook](https://playfulprogramming.com
327326
> x You're importing a component that needs `useState`. This React hook only works in a client component. To fix, mark the file (or its parent) with the `"use client"` directive.
328327
> ```
329328
>
330-
> This is because you're not importing server-side code from `@tanstack/react-form/nextjs`. Ensure you're importing the correct module based on the environment.
329+
> This is because you're not importing server-side code from `@tanstack/react-form-nextjs`. Ensure you're importing the correct module based on the environment.
331330
>
332331
> [This is a limitation of Next.js](https://github.com/phryneas/rehackt). Other meta-frameworks will likely not have this same problem.
333332
@@ -347,7 +346,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
347346
348347
```typescript
349348
// routes/_index/route.tsx
350-
import { formOptions } from '@tanstack/react-form/remix'
349+
import { formOptions } from '@tanstack/react-form-remix'
351350
352351
// You can pass other form options here
353352
export const formOpts = formOptions({
@@ -367,7 +366,7 @@ import {
367366
ServerValidateError,
368367
createServerValidate,
369368
formOptions,
370-
} from '@tanstack/react-form/remix'
369+
} from '@tanstack/react-form-remix'
371370

372371
import type { ActionFunctionArgs } from '@remix-run/node'
373372

@@ -410,10 +409,10 @@ Finally, the `action` will be called when the form submits.
410409

411410
```tsx
412411
// routes/_index/route.tsx
413-
import { Form, useActionData } from '@remix-run/react'
414-
415412
import {
413+
Form,
416414
mergeForm,
415+
useActionData
417416
useForm,
418417
useStore,
419418
useTransform,
@@ -423,7 +422,7 @@ import {
423422
createServerValidate,
424423
formOptions,
425424
initialFormState,
426-
} from '@tanstack/react-form/remix'
425+
} from '@tanstack/react-form-remix'
427426

428427
import type { ActionFunctionArgs } from '@remix-run/node'
429428

examples/lit/array/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lit": "^3.3.1"
1414
},
1515
"devDependencies": {
16-
"vite": "^7.1.6"
16+
"vite": "^7.2.2"
1717
},
1818
"browserslist": {
1919
"production": [

examples/lit/simple/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lit": "^3.3.1"
1414
},
1515
"devDependencies": {
16-
"vite": "^7.1.6"
16+
"vite": "^7.2.2"
1717
},
1818
"browserslist": {
1919
"production": [

examples/lit/standard-schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"zod": "^3.25.76"
1818
},
1919
"devDependencies": {
20-
"vite": "^7.1.6"
20+
"vite": "^7.2.2"
2121
},
2222
"browserslist": {
2323
"production": [

examples/lit/ui-libraries/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"lit": "^3.3.1"
1515
},
1616
"devDependencies": {
17-
"vite": "^7.1.6"
17+
"vite": "^7.2.2"
1818
},
1919
"browserslist": {
2020
"production": [

examples/react/array/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"devDependencies": {
1919
"@types/react": "^19.0.7",
2020
"@types/react-dom": "^19.0.3",
21-
"@vitejs/plugin-react": "^4.7.0",
22-
"vite": "^7.1.6"
21+
"@vitejs/plugin-react": "^5.1.1",
22+
"vite": "^7.2.2"
2323
},
2424
"browserslist": {
2525
"production": [

examples/react/compiler/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"devDependencies": {
1717
"@types/react": "^19.0.7",
1818
"@types/react-dom": "^19.0.3",
19-
"@vitejs/plugin-react": "^4.7.0",
19+
"@vitejs/plugin-react": "^5.1.1",
2020
"babel-plugin-react-compiler": "19.1.0-rc.3",
2121
"eslint-plugin-react-compiler": "19.1.0-rc.2",
22-
"vite": "^7.1.6"
22+
"vite": "^7.2.2"
2323
},
2424
"browserslist": {
2525
"production": [

examples/react/devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"devDependencies": {
1919
"@types/react": "^19.0.7",
2020
"@types/react-dom": "^19.0.3",
21-
"@vitejs/plugin-react": "^4.7.0",
22-
"vite": "^7.1.6"
21+
"@vitejs/plugin-react": "^5.1.1",
22+
"vite": "^7.2.2"
2323
},
2424
"browserslist": {
2525
"production": [

0 commit comments

Comments
 (0)