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

Conversation

melkir
Copy link

@melkir melkir commented May 14, 2025

This seems to be required for Tanstack Start, following the guide by putting everything on my route and ended-up having this error

[vite] (ssr) Error when evaluating SSR module <root>/src/routes/index.tsx?tsr-directive-use-server=: Cannot access 'formOpts' before initialization

This is required for Tanstack Start otherwise the following error appears
```
[vite] (ssr) Error when evaluating SSR module <root>/src/routes/index.tsx?tsr-directive-use-server=: Cannot access 'formOpts' before initialization
```
@melkir melkir changed the title Update ssr.md fix(doc): update ssr.md for tanstack start May 14, 2025
@@ -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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant