Skip to content

Conversation

@brenelz
Copy link
Contributor

@brenelz brenelz commented Oct 3, 2025

Updating the Tanstack Start for Solid docs by copying them over and making changes. I also made tweaks to two pages in the react docs

I didn't end up previewing them with Tanstack.com as I was getting an error. I will try again here shortly

Summary by CodeRabbit

  • Documentation
    • Major overhaul of Solid framework docs: new/expanded guides for Getting Started, Build from Scratch, Routing, Server Functions/Routes, Selective SSR, Static Prerendering, Authentication, Environment Variables, Execution Model, Code Execution Patterns, Client Entry Point, Observability, Tailwind integration, plus examples, patterns, and production checklists.
    • React docs: updated path-alias guidance to reference Vite config and clarified server-route examples.
  • Style
    • Improved code block formatting for clarity in server-route docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Large documentation migration: many React-targeted Start docs were rewritten or replaced with Solid-specific front matter and comprehensive Solid/TanStack Start guides; minor React docs update switching config references to vite.config.ts and small formatting tweaks. No runtime code changes.

Changes

Cohort / File(s) Summary
Solid framework docs overhaul
docs/start/framework/solid/*
Replaces React remap front-matter with Solid-specific ids/titles and expands many pages into full Solid/TanStack Start guides (auth, build-from-scratch, client entry, execution patterns, env vars, execution model, getting started, hosting, observability, quick-start, routing, selective-SSR, server-functions mapping, server-routes, static-prerendering, tailwind-integration). Adds examples, patterns, and config snippets; documentation-only edits.
React docs adjustments
docs/start/framework/react/path-aliases.md, docs/start/framework/react/server-routes.md, docs/start/framework/react/fetching-external-api.md, docs/start/framework/react/reading-writing-file.md
Swap references from app.config.ts to vite.config.ts and update example import to defineConfig from vite; reformat code fences in server-routes docs. No runtime changes.
Server functions replacement map update
docs/start/framework/solid/server-functions.md
Extends replacement map to include @tanstack/react-router@tanstack/solid-router alongside existing React→Solid mappings. Documentation-only change.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant C as Solid Client
  participant SF as Server Functions
  participant S as Session Store
  participant SR as Server Routes

  U->>C: submit login form
  C->>SF: serverFn.login(credentials)
  activate SF
  SF->>SF: validate credentials
  SF-->>S: set session cookie
  SF-->>C: return user
  deactivate SF

  C->>SR: request protected route (with cookie)
  SR->>S: read session
  alt authenticated
    SR-->>C: 200 + data
  else not authenticated
    SR-->>C: 302 redirect to /login
  end

  U->>C: click logout
  C->>SF: serverFn.logout()
  SF->>S: clear session
  SF-->>C: success
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

package: solid-start, package: react-start

Suggested reviewers

  • schiller-manuel

Poem

Hop hop, docs pop—Solid’s pages bloom,
I swapped old leaves, cleared every room.
Routes and auth, cookies snug and neat,
Tailwind stitches make the style complete.
A carrot of docs—crisp, clear, and sweet. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the primary change of updating the Solid Start documentation, which aligns with the bulk of the PR’s content and objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4393ed1 and 33da42a.

📒 Files selected for processing (3)
  • docs/start/framework/react/fetching-external-api.md (1 hunks)
  • docs/start/framework/react/path-aliases.md (1 hunks)
  • docs/start/framework/react/reading-writing-file.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/start/framework/react/reading-writing-file.md
  • docs/start/framework/react/fetching-external-api.md
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

Files:

  • docs/start/framework/react/path-aliases.md
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

Place router docs under docs/router/ and start framework docs under docs/start/

Files:

  • docs/start/framework/react/path-aliases.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Preview

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the documentation Everything documentation related label Oct 3, 2025
@nx-cloud
Copy link

nx-cloud bot commented Oct 3, 2025

View your CI Pipeline Execution ↗ for commit 33da42a

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-03 01:48:40 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 3, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5347

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5347

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5347

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5347

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5347

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5347

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5347

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5347

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5347

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5347

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5347

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5347

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5347

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5347

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5347

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5347

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5347

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5347

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5347

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5347

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5347

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5347

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5347

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5347

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5347

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5347

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5347

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5347

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5347

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5347

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5347

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5347

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5347

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5347

commit: 33da42a

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/start/framework/react/server-routes.md (1)

456-468: Restore the missing closing brace in the example.

The server object isn’t closed anymore, so the example no longer parses. Please add the closing }, before the final }).

 export const Route = createFileRoute('/hello')({
   server: {
     handlers: {
       GET: async ({ request }) => {
         return new Response('Hello, World!', {
           headers: {
             'Content-Type': 'text/plain',
           },
         })
       },
     },
-  })
+  },
+})
🧹 Nitpick comments (2)
docs/start/framework/solid/quick-start.md (1)

10-18: Label the shell snippets for markdownlint.

MD040 is firing because these fences aren’t typed. Adding bash keeps lint green.

-```
+```bash
 pnpm create @tanstack/start@latest

or

- +bash
npm create @tanstack/start@latest

docs/start/framework/solid/server-routes.md (1)

103-106: Swap the absolute docs link for a relative one.

Docs convention prefers relative paths from docs/; the absolute /router/... link breaks that rule. As per coding guidelines.

-You can read more about this in the [TanStack Router File-based Routing Guide](/router/latest/docs/framework/solid/routing/file-based-routing#s-or-s).
+You can read more about this in the [TanStack Router File-based Routing Guide](../../../../router/framework/solid/routing/file-based-routing#s-or-s).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac35dd2 and 4393ed1.

📒 Files selected for processing (18)
  • docs/start/framework/react/path-aliases.md (1 hunks)
  • docs/start/framework/react/server-routes.md (3 hunks)
  • docs/start/framework/solid/authentication.md (1 hunks)
  • docs/start/framework/solid/build-from-scratch.md (1 hunks)
  • docs/start/framework/solid/client-entry-point.md (1 hunks)
  • docs/start/framework/solid/code-execution-patterns.md (1 hunks)
  • docs/start/framework/solid/environment-variables.md (1 hunks)
  • docs/start/framework/solid/execution-model.md (1 hunks)
  • docs/start/framework/solid/getting-started.md (1 hunks)
  • docs/start/framework/solid/hosting.md (1 hunks)
  • docs/start/framework/solid/observability.md (1 hunks)
  • docs/start/framework/solid/quick-start.md (1 hunks)
  • docs/start/framework/solid/routing.md (1 hunks)
  • docs/start/framework/solid/selective-ssr.md (1 hunks)
  • docs/start/framework/solid/server-functions.md (1 hunks)
  • docs/start/framework/solid/server-routes.md (1 hunks)
  • docs/start/framework/solid/static-prerendering.md (1 hunks)
  • docs/start/framework/solid/tailwind-integration.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

Files:

  • docs/start/framework/solid/server-functions.md
  • docs/start/framework/solid/hosting.md
  • docs/start/framework/solid/routing.md
  • docs/start/framework/solid/selective-ssr.md
  • docs/start/framework/solid/client-entry-point.md
  • docs/start/framework/solid/observability.md
  • docs/start/framework/solid/quick-start.md
  • docs/start/framework/solid/execution-model.md
  • docs/start/framework/react/server-routes.md
  • docs/start/framework/solid/static-prerendering.md
  • docs/start/framework/solid/environment-variables.md
  • docs/start/framework/solid/getting-started.md
  • docs/start/framework/solid/code-execution-patterns.md
  • docs/start/framework/solid/tailwind-integration.md
  • docs/start/framework/solid/build-from-scratch.md
  • docs/start/framework/solid/server-routes.md
  • docs/start/framework/react/path-aliases.md
  • docs/start/framework/solid/authentication.md
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

Place router docs under docs/router/ and start framework docs under docs/start/

Files:

  • docs/start/framework/solid/server-functions.md
  • docs/start/framework/solid/hosting.md
  • docs/start/framework/solid/routing.md
  • docs/start/framework/solid/selective-ssr.md
  • docs/start/framework/solid/client-entry-point.md
  • docs/start/framework/solid/observability.md
  • docs/start/framework/solid/quick-start.md
  • docs/start/framework/solid/execution-model.md
  • docs/start/framework/react/server-routes.md
  • docs/start/framework/solid/static-prerendering.md
  • docs/start/framework/solid/environment-variables.md
  • docs/start/framework/solid/getting-started.md
  • docs/start/framework/solid/code-execution-patterns.md
  • docs/start/framework/solid/tailwind-integration.md
  • docs/start/framework/solid/build-from-scratch.md
  • docs/start/framework/solid/server-routes.md
  • docs/start/framework/react/path-aliases.md
  • docs/start/framework/solid/authentication.md
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • docs/start/framework/solid/server-functions.md
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/

Applied to files:

  • docs/start/framework/solid/routing.md
🪛 markdownlint-cli2 (0.18.1)
docs/start/framework/solid/hosting.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/start/framework/solid/quick-start.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/start/framework/solid/environment-variables.md

94-94: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/start/framework/solid/build-from-scratch.md

115-115: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test

Comment on lines +25 to +26
> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the malformed note block.

> [!NOTE] > ... won’t render—split the label and content onto separate lines so the admonition shows up.

-> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
+> [!NOTE]
+> We use `npm` in all of these examples, but you can use your package manager of choice instead.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
> [!NOTE]
> We use `npm` in all of these examples, but you can use your package manager of choice instead.
🤖 Prompt for AI Agents
In docs/start/framework/solid/build-from-scratch.md around lines 25 to 26, the
note admonition is malformed because the label and content are on the same line
(`> [!NOTE] > ...`); split them so the label line contains only `> [!NOTE]` and
the next line(s) contain the note content (e.g., `> We use npm ...`) to render
the admonition correctly.

Comment on lines +114 to +125

```
.
├── src/
│ ├── routes/
│ │ └── `__root.tsx`
│ ├── `router.tsx`
│ ├── `routeTree.gen.ts`
├── `vite.config.ts`
├── `package.json`
└── `tsconfig.json`
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add a language tag to the file-tree fence.

markdownlint (MD040) fails because this fence lacks a language. Tag it (e.g. text) to unblock the pipeline. Based on static analysis hints.

-```
+```text
 .
 ├── src/
 │   ├── routes/
 │   │   └── `__root.tsx`
 │   ├── `router.tsx`
 │   ├── `routeTree.gen.ts`
 ├── `vite.config.ts`
 ├── `package.json`
 └── `tsconfig.json`
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

115-115: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In docs/start/framework/solid/build-from-scratch.md around lines 114 to 125, the
fenced code block showing the file tree lacks a language tag causing
markdownlint MD040; update the opening fence to include a language identifier
(for example change ``` to ```text) so the block reads as a text code fence,
preserving the content exactly and leaving the closing ``` unchanged.

Comment on lines +94 to +99
```
.env.local # Local overrides (add to .gitignore)
.env.production # Production-specific variables
.env.development # Development-specific variables
.env # Default variables (commit to git)
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Label the file-tree fence.

markdownlint (MD040) flags this unlabeled fence; add a language (e.g. text) so docs build cleanly. Based on static analysis hints.

-```
+```text
 .env.local          # Local overrides (add to .gitignore)
 .env.production     # Production-specific variables
 .env.development    # Development-specific variables
 .env                # Default variables (commit to git)
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

94-94: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In docs/start/framework/solid/environment-variables.md around lines 94 to 99,
the fenced code block lacks a language label which triggers markdownlint MD040;
add a language identifier (e.g., text) immediately after the opening backticks
so the fence is labeled and the docs build cleanly.

Comment on lines +10 to +13
- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
- [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks
- [Quick Start Examples](../quick-start) Download or clone one of our official examples
- [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add the missing CLI link.

[TanStack Start CLI] renders as literal text because no href is attached. Give it a real target (e.g. docs or repo URL) so the callout works.

-- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
+- [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
- [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks
- [Quick Start Examples](../quick-start) Download or clone one of our official examples
- [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.
- [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
- [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks
- [Quick Start Examples](../quick-start) Download or clone one of our official examples
- [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.
🤖 Prompt for AI Agents
In docs/start/framework/solid/getting-started.md around lines 10 to 13 the
`[TanStack Start CLI]` text has no href so it renders as literal; update that
markdown to include a proper link target (for example the CLI docs or the repo
URL) by turning the bracketed text into a linked form with the chosen URL and
ensure the link follows the same style as the other entries so the callout
renders correctly.

Comment on lines +169 to +176
const data = Route.useLoaderData()

// Track client-side render time
Solid.createEffect(() => {
const renderTime = performance.now()
console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`)
})

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Import and use createEffect directly.

Solid.createEffect will throw because Solid isn’t defined. Import createEffect (or namespace Solid) before using it.

-import { createFileRoute } from '@tanstack/solid-router'
+import { createFileRoute } from '@tanstack/solid-router'
+import { createEffect } from 'solid-js'
 ...
-  Solid.createEffect(() => {
+  createEffect(() => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const data = Route.useLoaderData()
// Track client-side render time
Solid.createEffect(() => {
const renderTime = performance.now()
console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`)
})
import { createFileRoute } from '@tanstack/solid-router'
import { createEffect } from 'solid-js'
const data = Route.useLoaderData()
// Track client-side render time
createEffect(() => {
const renderTime = performance.now()
console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`)
})
🤖 Prompt for AI Agents
In docs/start/framework/solid/observability.md around lines 169 to 176, the code
calls Solid.createEffect but the Solid namespace isn't defined; import
createEffect from "solid-js" (or import * as Solid and use Solid.createEffect)
at the top of the file and replace Solid.createEffect(...) with
createEffect(...) (or keep Solid.createEffect if you choose the namespace
import) so the effect call resolves correctly.

Comment on lines +71 to +115
// src/routes/__root.tsx
import {
Outlet,
createRootRoute,
HeadContent,
Scripts,
} from '@tanstack/solid-router'
import type { solidNode } from 'solid'

export const Route = createRootRoute({
head: () => ({
meta: [
{
charSet: 'utf-8',
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
title: 'TanStack Start Starter',
},
],
}),
component: RootComponent,
})

function RootComponent() {
return (
<RootDocument>
<Outlet />
</RootDocument>
)
}

function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
return (
<>
<HeadContent />
{children}
<Scripts />
</>
)
}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the Solid import/type usage in the root-route snippet.

import type { solidNode } from 'solid' doesn’t exist, and Solid is undefined when you reference Solid.JSX.Element. Import JSX from solid-js (or namespace Solid) and update the type to keep the sample compilable.

-import {
-  Outlet,
-  createRootRoute,
-  HeadContent,
-  Scripts,
-} from '@tanstack/solid-router'
-import type { solidNode } from 'solid'
+import {
+  Outlet,
+  createRootRoute,
+  HeadContent,
+  Scripts,
+} from '@tanstack/solid-router'
+import type { JSX } from 'solid-js'
 ...
-function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
+function RootDocument({ children }: Readonly<{ children: JSX.Element }>) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// src/routes/__root.tsx
import {
Outlet,
createRootRoute,
HeadContent,
Scripts,
} from '@tanstack/solid-router'
import type { solidNode } from 'solid'
export const Route = createRootRoute({
head: () => ({
meta: [
{
charSet: 'utf-8',
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
title: 'TanStack Start Starter',
},
],
}),
component: RootComponent,
})
function RootComponent() {
return (
<RootDocument>
<Outlet />
</RootDocument>
)
}
function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
return (
<>
<HeadContent />
{children}
<Scripts />
</>
)
}
```
// src/routes/__root.tsx
import {
Outlet,
createRootRoute,
HeadContent,
Scripts,
} from '@tanstack/solid-router'
import type { JSX } from 'solid-js'
export const Route = createRootRoute({
head: () => ({
meta: [
{
charSet: 'utf-8',
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
title: 'TanStack Start Starter',
},
],
}),
component: RootComponent,
})
function RootComponent() {
return (
<RootDocument>
<Outlet />
</RootDocument>
)
}
function RootDocument({ children }: Readonly<{ children: JSX.Element }>) {
return (
<>
<HeadContent />
{children}
<Scripts />
</>
)
}
🤖 Prompt for AI Agents
In docs/start/framework/solid/routing.md around lines 71 to 115, the snippet
incorrectly imports and references Solid types: `import type { solidNode } from
'solid'` and uses `Solid.JSX.Element`, which don't exist; replace that import
with a proper JSX type import (e.g., `import type { JSX } from 'solid-js'`) and
update the component prop type to `children: JSX.Element` (or alternatively
import the namespace `* as Solid from 'solid-js'` and keep `Solid.JSX.Element`)
so the example compiles.

Comment on lines +156 to +159
├── __root.tsx <-- Renders the <Root> component
├── posts.tsx <-- Renders the <Posts> component
├── posts.$postId.tsx <-- Renders the <Post> component
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Correct the dynamic route filename.

The example shows posts.$postId.tsx, but the actual file should live at posts/$postId.tsx. Update the tree so newcomers don’t create the wrong file.

-├── posts.$postId.tsx <-- Renders the <Post> component
+├── posts/$postId.tsx <-- Renders the <Post> component
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
├── __root.tsx <-- Renders the <Root> component
├── posts.tsx <-- Renders the <Posts> component
├── posts.$postId.tsx <-- Renders the <Post> component
```
├── __root.tsx <-- Renders the <Root> component
├── posts.tsx <-- Renders the <Posts> component
├── posts/$postId.tsx <-- Renders the <Post> component
🤖 Prompt for AI Agents
In docs/start/framework/solid/routing.md around lines 156 to 159, the route
example shows an incorrect filename `posts.$postId.tsx`; update the tree to use
the correct dynamic route path `posts/$postId.tsx` (i.e., change the dotted
filename to a directory with a dollar-prefixed file) so the example reflects the
actual filesystem layout newcomers must create.

Comment on lines +454 to +468
// routes/hello.ts
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/hello')({
server: {
handlers: {
GET: async ({ request }) => {
return new Response('Hello, World!', {
headers: {
'Content-Type': 'text/plain',
},
})
},
},
})
// Visit /hello to see the response
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Close the server block in this snippet.

The example lost its }, so it won’t compile when copied. Please restore the brace before }).

 export const Route = createFileRoute('/hello')({
   server: {
     handlers: {
       GET: async ({ request }) => {
         return new Response('Hello, World!', {
           headers: {
             'Content-Type': 'text/plain',
           },
         })
       },
     },
-  })
+  },
+})
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// routes/hello.ts
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/hello')({
server: {
handlers: {
GET: async ({ request }) => {
return new Response('Hello, World!', {
headers: {
'Content-Type': 'text/plain',
},
})
},
},
})
// Visit /hello to see the response
// routes/hello.ts
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/hello')({
server: {
handlers: {
GET: async ({ request }) => {
return new Response('Hello, World!', {
headers: {
'Content-Type': 'text/plain',
},
})
},
},
},
})
// Visit /hello to see the response
🤖 Prompt for AI Agents
In docs/start/framework/solid/server-routes.md around lines 454 to 468, the
example is missing the closing brace and comma for the server block before the
final }) call; restore the server block closure by adding the missing `},`
immediately before the `})` so the object literal is properly closed and the
snippet compiles.

Comment on lines +18 to +59
export default defineConfig({
plugins: [
tanstackStart({
prerender: {
// Enable prerendering
enabled: true,

// Enable if you need pages to be at `/page/index.html` instead of `/page.html`
autoSubfolderIndex: true,

// How many prerender jobs to run at once
concurrency: 14,

// Whether to extract links from the HTML and prerender them also
crawlLinks: true,

// Filter function takes the page object and returns whether it should prerender
filter: ({ path }) => !path.startsWith('/do-not-render-me'),

// Number of times to retry a failed prerender job
retryCount: 2,

// Delay between retries in milliseconds
retryDelay: 1000,

// Callback when page is successfully rendered
onSuccess: ({ page }) => {
console.log(`Rendered ${page.path}!`)
},
},
// Optional configuration for specific pages (without this it will still automatically
// prerender all routes)
pages: [
{
path: '/my-page',
prerender: { enabled: true, outputPath: '/my-page/index.html' },
},
],
}),
viteSolid({ ssr: true }),
],
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add the missing defineConfig import.

The snippet calls defineConfig(...) but never imports it from vite, so copying this into vite.config.ts fails. Please add import { defineConfig } from 'vite' above the plugin imports.

🤖 Prompt for AI Agents
In docs/start/framework/solid/static-prerendering.md around lines 18 to 59, the
example calls defineConfig(...) but never imports it; add an import statement
for defineConfig from 'vite' at the top of the snippet (e.g., import {
defineConfig } from 'vite') so the example compiles when copied into a
vite.config.ts file.

@brenelz brenelz merged commit 0d3bba8 into TanStack:main Oct 4, 2025
6 checks passed
@brenelz brenelz deleted the solid-start-doc-updates branch October 4, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants