Skip to content

Commit bea5803

Browse files
feat: use react-start packages for Start support (#1191)
1 parent 8672e57 commit bea5803

File tree

11 files changed

+406
-342
lines changed

11 files changed

+406
-342
lines changed

examples/react/tanstack-start/app.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from '@tanstack/start/config'
1+
import { defineConfig } from '@tanstack/react-start/config'
22
import tsConfigPaths from 'vite-tsconfig-paths'
33

44
export default defineConfig({

examples/react/tanstack-start/app/client.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { hydrateRoot } from 'react-dom/client'
2-
import { StartClient } from '@tanstack/start'
2+
import { StartClient } from '@tanstack/react-start'
33
import { createRouter } from './router'
44

55
const router = createRouter()

examples/react/tanstack-start/app/routes/__root.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
ScrollRestoration,
44
createRootRoute,
55
} from '@tanstack/react-router'
6-
import { Meta, Scripts } from '@tanstack/start'
6+
import { Meta, Scripts } from '@tanstack/react-start'
77
import * as React from 'react'
88

99
export const Route = createRootRoute({

examples/react/tanstack-start/app/ssr.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
createStartHandler,
33
defaultStreamHandler,
4-
} from '@tanstack/start/server'
5-
import { getRouterManifest } from '@tanstack/start/router-manifest'
4+
} from '@tanstack/react-start/server'
5+
import { getRouterManifest } from '@tanstack/react-start/router-manifest'
66

77
import { createRouter } from './router'
88

examples/react/tanstack-start/app/utils/form.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { createServerFn } from '@tanstack/start'
1+
import { createServerFn } from '@tanstack/react-start'
22
import { formOptions } from '@tanstack/react-form'
33
import {
44
ServerValidateError,
55
createServerValidate,
66
getFormData,
77
} from '@tanstack/react-form/start'
8-
import { setResponseStatus } from 'vinxi/http'
8+
import { setResponseStatus } from '@tanstack/react-start/server'
99

1010
export const formOpts = formOptions({
1111
defaultValues: {

examples/react/tanstack-start/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"dependencies": {
1212
"@tanstack/form-core": "^0.45.1",
1313
"@tanstack/react-form": "^0.45.1",
14-
"@tanstack/react-router": "^1.95.6",
14+
"@tanstack/react-router": "^1.112.0",
15+
"@tanstack/react-start": "^1.112.0",
1516
"@tanstack/react-store": "^0.7.0",
16-
"@tanstack/start": "^1.95.7",
1717
"react": "^19.0.0",
1818
"react-dom": "^19.0.0",
1919
"vinxi": "^0.5.1"

knip.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
3-
"ignoreDependencies": ["@tanstack/start", "vinxi"],
3+
"ignoreDependencies": ["@tanstack/react-start", "vinxi"],
44
"ignoreWorkspaces": ["examples/**"]
55
}

packages/react-form/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"decode-formdata": "^0.8.0"
8989
},
9090
"devDependencies": {
91-
"@tanstack/start": "^1.95.7",
91+
"@tanstack/react-start": "^1.112.0",
9292
"@types/react": "^19.0.7",
9393
"@types/react-dom": "^19.0.3",
9494
"@vitejs/plugin-react": "^4.3.4",
@@ -99,12 +99,12 @@
9999
"vite": "^6.1.1"
100100
},
101101
"peerDependencies": {
102-
"@tanstack/start": "^1.81.6",
102+
"@tanstack/react-start": "^1.112.0",
103103
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
104104
"vinxi": "^0.5.0"
105105
},
106106
"peerDependenciesMeta": {
107-
"@tanstack/start": {
107+
"@tanstack/react-start": {
108108
"optional": true
109109
},
110110
"vinxi": {

packages/react-form/src/start/createServerValidate.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
isStandardSchemaValidator,
55
standardSchemaValidators,
66
} from '@tanstack/form-core'
7-
import { getHeader } from 'vinxi/http'
7+
import { getHeader } from '@tanstack/react-start/server'
88
import { _tanstackInternalsCookie } from './utils'
99
import { ServerValidateError } from './error'
1010
import type {

packages/react-form/src/start/getFormData.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getHeader, removeResponseHeader } from 'vinxi/http'
1+
import { getHeader, removeResponseHeader } from '@tanstack/react-start/server'
22
import { _tanstackInternalsCookie } from './utils'
33
import type { ServerFormState } from './types'
44

pnpm-lock.yaml

+391-327
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)