Skip to content

fix(doc): update ssr.md for tanstack start #1511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/framework/react/guides/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This section focuses on integrating TanStack Form with TanStack Start.
Let's start by creating a `formOption` that we'll use to share the form's shape across the client and server.

```typescript
// app/routes/index.tsx, but can be extracted to any other path
// src/utils/form-isomorphic.ts, but can be extracted to any other path
Copy link
Author

@melkir melkir May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What could be a good comment for specifying that we shouldn't put the isomorphic code on routes file?

import { formOptions } from '@tanstack/react-form'

// You can pass other form options here
Expand Down Expand Up @@ -113,6 +113,7 @@ import {
useStore,
useTransform,
} from '@tanstack/react-form'
import { formOpts } from '~/utils/form-isomorphic'

export const Route = createFileRoute('/')({
component: Home,
Expand Down