docs(solid-start): add start-streaming-data-from-server-functions example #5837
main fromrefs/pull/5837/head·merged by birkskyum(GitHub profile, opens in a new tab) Adds
- start-streaming-data-from-server-functions
- start-counter (renamed from start-bare)
Tracking
Summary by CodeRabbit#
New Features
- Added a new streaming data example demonstrating how to stream typed data from server functions using both ReadableStream and async generators.
Documentation
- Removed the "Bare" Solid example.
- Updated example naming structure.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsdocumentation
View your CI Pipeline Execution ↗ for commit 3bf5f490ff20dcd55ef773c82d69a5eebf52dc77
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 5m 22s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2025-11-12 17:49:05UTCMore templates
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
- tanstack-router-solid-example-authenticated-routes
- tanstack-router-solid-example-authenticated-routes-firebase
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-default-search-params
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-basic-virtual-file-based
- tanstack-router-solid-example-basic-virtual-inside-file-based
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-quickstart
- tanstack-router-solid-example-quickstart-esbuild-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-router-solid-example-quickstart-rspack-file-based
- tanstack-router-solid-example-quickstart-webpack-file-based
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-solid-start-bun-hosting
- tanstack-solid-start-example-convex-better-auth
- tanstack-solid-start-example-counter
- tanstack-solid-start-streaming-data-from-server-functions
- tanstack-solid-start-example-supabase-basic
- tanstack-router-solid-example-view-transitions
- tanstack-router-solid-example-with-framer-motion
- tanstack-router-solid-example-with-trpc
@tanstack/arktype-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5837@tanstack/directive-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5837@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5837@tanstack/history
npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5837@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5837@tanstack/react-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5837@tanstack/react-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5837@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5837@tanstack/react-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5837@tanstack/react-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5837@tanstack/react-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5837@tanstack/router-cli
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5837@tanstack/router-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5837@tanstack/router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5837@tanstack/router-devtools-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5837@tanstack/router-generator
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5837@tanstack/router-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5837@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5837@tanstack/router-utils
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5837@tanstack/router-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5837@tanstack/server-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5837@tanstack/solid-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5837@tanstack/solid-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5837@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5837@tanstack/solid-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5837@tanstack/solid-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5837@tanstack/solid-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5837@tanstack/start-client-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5837@tanstack/start-plugin-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5837@tanstack/start-server-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5837@tanstack/start-static-server-functions
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5837@tanstack/start-storage-context
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5837@tanstack/valibot-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5837@tanstack/virtual-file-routes
npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5837@tanstack/zod-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5837commit:
3bf5f49Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
examples/solid/start-counter/package.json (1)
12-14: Useworkspace:*protocol for internal @tanstack dependencies.Internal monorepo packages should reference the workspace version rather than explicit semver versions, as per coding guidelines.
Apply this diff to use the workspace protocol:
"dependencies": { - "@tanstack/solid-router": "^1.135.2", - "@tanstack/solid-router-devtools": "^1.135.2", - "@tanstack/solid-start": "^1.135.2", + "@tanstack/solid-router": "workspace:*", + "@tanstack/solid-router-devtools": "workspace:*", + "@tanstack/solid-start": "workspace:*", "solid-js": "^1.9.10",As per coding guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 85f9734b6478a482d9143d56fc40bdc9d6588b55 and 3bf5f490ff20dcd55ef773c82d69a5eebf52dc77.
⛔ Files ignored due to path filters (3)
examples/solid/start-counter/public/favicon.icois excluded by!**/*.icoexamples/solid/start-streaming-data-from-server-functions/public/favicon.icois excluded by!**/*.icopnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
docs/start/config.json(0 hunks)examples/solid/start-counter/package.json(1 hunks)examples/solid/start-streaming-data-from-server-functions/package.json(1 hunks)examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts(1 hunks)examples/solid/start-streaming-data-from-server-functions/src/router.tsx(1 hunks)examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx(1 hunks)examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx(1 hunks)examples/solid/start-streaming-data-from-server-functions/src/styles/app.css(1 hunks)examples/solid/start-streaming-data-from-server-functions/tsconfig.json(1 hunks)examples/solid/start-streaming-data-from-server-functions/vite.config.ts(1 hunks)
💤 Files with no reviewable changes (1)
- docs/start/config.json
🧰 Additional context used
📓 Path-based instructions (4)
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace:* protocol for internal dependencies in package.json files
Files:
examples/solid/start-streaming-data-from-server-functions/package.jsonexamples/solid/start-counter/package.json
examples/{react,solid}/**
📄 CodeRabbit inference engine (AGENTS.md)
Keep example applications under examples/react/ and examples/solid/
Files:
examples/solid/start-streaming-data-from-server-functions/package.jsonexamples/solid/start-counter/package.jsonexamples/solid/start-streaming-data-from-server-functions/src/routes/index.tsxexamples/solid/start-streaming-data-from-server-functions/src/router.tsxexamples/solid/start-streaming-data-from-server-functions/tsconfig.jsonexamples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsxexamples/solid/start-streaming-data-from-server-functions/vite.config.tsexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.tsexamples/solid/start-streaming-data-from-server-functions/src/styles/app.css
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsxexamples/solid/start-streaming-data-from-server-functions/src/router.tsxexamples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsxexamples/solid/start-streaming-data-from-server-functions/vite.config.tsexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsxexamples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/Learnt from: CR Repo: TanStack/router PR: 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-11-02T16:16:24.898Z
Learnt from: nlynzaad Repo: TanStack/router PR: 5732 File: packages/start-client-core/src/client/hydrateStart.ts:6-9 Timestamp: 2025-11-02T16:16:24.898Z Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.Applied to files:
examples/solid/start-streaming-data-from-server-functions/package.jsonexamples/solid/start-streaming-data-from-server-functions/tsconfig.jsonexamples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsxexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 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:
examples/solid/start-streaming-data-from-server-functions/package.jsonexamples/solid/start-streaming-data-from-server-functions/src/router.tsxexamples/solid/start-streaming-data-from-server-functions/tsconfig.jsonexamples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsxexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad Repo: TanStack/router PR: 5402 File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21 Timestamp: 2025-10-08T08:11:47.088Z Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.Applied to files:
examples/solid/start-streaming-data-from-server-functions/src/router.tsxexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/Applied to files:
examples/solid/start-streaming-data-from-server-functions/src/router.tsxexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebaseApplied to files:
examples/solid/start-streaming-data-from-server-functions/tsconfig.json
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel Repo: TanStack/router PR: 5330 File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61 Timestamp: 2025-10-01T18:31:35.420Z Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.Applied to files:
examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directoriesApplied to files:
examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directoriesApplied to files:
examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
🧬 Code graph analysis (3)
examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx (1)
examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx (1)
Route(13-18)
examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx (1)
examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx (1)
Route(91-93)
examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts (1)
examples/solid/start-streaming-data-from-server-functions/src/router.tsx (1)
getRouter(4-14)
⏰ 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: Test
- GitHub Check: Preview
🔇 Additional comments (1)
examples/solid/start-counter/package.json (1)
2-2: Package name aligns with directory structure.The rename from "tanstack-solid-start-example-bare" to "tanstack-solid-start-example-counter" correctly reflects the new directory name and maintains consistency with naming conventions.
@@ -0,0 +1,9 @@1+{2+ "name": "tanstack-solid-start-streaming-data-from-server-functions",3+ "private": true,4+ "sideEffects": false,5+ "type": "module",6+ "scripts": {7+ "dev": "vite dev",8+ "build": "vite build && tsc --noEmit",9+ "start": "vite start"⚠️ Potential issue | 🔴 Critical
Fix the production preview script.
Vite exposes
dev,build, andpreview; there is novite start, sonpm run startwill fail at runtime. Switch tovite previewto align with the documented CLI.(vite.dev)- "start": "vite start" + "start": "vite preview"📝 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 change7- "dev": "vite dev",8- "build": "vite build && tsc --noEmit",9- "start": "vite start"7+ "dev": "vite dev",8+ "build": "vite build && tsc --noEmit",9+ "start": "vite preview"🤖 Prompt for AI Agents
In examples/solid/start-streaming-data-from-server-functions/package.json around lines 7 to 9, the "start" script is using the non-existent "vite start" CLI which will fail; update the "start" script to use "vite preview" (e.g., "start": "vite preview") so npm run start runs Vite's production preview, keeping the existing "build" and "dev" scripts unchanged.@@ -0,0 +1,17 @@1+{2+ "name": "tanstack-solid-start-streaming-data-from-server-functions",3+ "private": true,4+ "sideEffects": false,5+ "type": "module",6+ "scripts": {7+ "dev": "vite dev",8+ "build": "vite build && tsc --noEmit",9+ "start": "vite start"10+ },11+ "dependencies": {12+ "@tanstack/solid-router": "^1.135.2",13+ "@tanstack/solid-router-devtools": "^1.135.2",14+ "@tanstack/solid-start": "^1.135.2",15+ "solid-js": "^1.9.10",16+ "zod": "^3.24.2"17+ },🛠️ Refactor suggestion | 🟠 Major
Use workspace protocol for in-repo packages.
The @tanstack packages are part of this monorepo, so the dependencies here should point to
workspace:*instead of published semver ranges. This keeps the example pinned to the local sources during development and satisfies the repo’s package.json guideline. As per coding guidelines.- "@tanstack/solid-router": "^1.135.2", - "@tanstack/solid-router-devtools": "^1.135.2", - "@tanstack/solid-start": "^1.135.2", + "@tanstack/solid-router": "workspace:*", + "@tanstack/solid-router-devtools": "workspace:*", + "@tanstack/solid-start": "workspace:*",📝 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 change12- "@tanstack/solid-router": "^1.135.2",13- "@tanstack/solid-router-devtools": "^1.135.2",14- "@tanstack/solid-start": "^1.135.2",15- "solid-js": "^1.9.10",16- "zod": "^3.24.2"17- },12+ "@tanstack/solid-router": "workspace:*",13+ "@tanstack/solid-router-devtools": "workspace:*",14+ "@tanstack/solid-start": "workspace:*",15+ "solid-js": "^1.9.10",16+ "zod": "^3.24.2"17+ },🤖 Prompt for AI Agents
In examples/solid/start-streaming-data-from-server-functions/package.json around lines 12 to 17, the @tanstack dependencies use published semver ranges; replace each @tanstack/* entry to use the workspace protocol (e.g., "workspace:*") so the package points to the in-repo packages instead of external releases, and keep other deps (solid-js, zod) unchanged.@@ -0,0 +17,21 @@17+ component: RootComponent,18+})19+20+function RootComponent() {21+ return (22+ <RootDocument>23+ <Outlet />24+ </RootDocument>25+ )26+}27+28+function RootDocument({ children }: { children: JSX.Element }) {29+ return (30+ <html>31+ <head>32+ <HydrationScript />33+ </head>34+ <body>35+ <HeadContent />36+ {children}37+ <TanStackRouterDevtools position="bottom-right" />⚠️ Potential issue | 🟠 Major
Move
HeadContentinto<head>.HeadContentrenders<title>, meta tags, and links; keeping it in<body>produces invalid markup and prevents browsers from treating those tags as head elements. Render it inside<head>alongsideHydrationScript, and leave<body>for app content/devtools.- <html> - <head> - <HydrationScript /> - </head> - <body> - <HeadContent /> + <html> + <head> + <HydrationScript /> + <HeadContent /> + </head> + <body> {children}📝 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 change31- <head>32- <HydrationScript />33- </head>34- <body>35- <HeadContent />36- {children}37- <TanStackRouterDevtools position="bottom-right" />31+ <head>32+ <HydrationScript />33+ <HeadContent />34+ </head>35+ <body>36+ {children}37+ <TanStackRouterDevtools position="bottom-right" />🤖 Prompt for AI Agents
In examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx around lines 31 to 37, HeadContent is being rendered inside the <body> which places <title>, meta and link tags in the body; move the <HeadContent /> component into the <head> section next to <HydrationScript /> so those tags are output inside the document head and leave the <body> to contain {children} and the TanStackRouterDevtools.birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Walkthrough#
The PR removes the "Bare" example from the Solid examples configuration list, renames the counter example package, and introduces a new streaming-data-from-server-functions example with complete Solid router scaffolding, TypeScript configuration, and a demonstration of streaming typed chunks via ReadableStream and async generator patterns.
Changes#
docs/start/config.jsonframework/solid/examples/start-bare) from the Solid example list.examples/solid/start-counter/package.jsontanstack-solid-start-example-baretotanstack-solid-start-example-counter.examples/solid/start-streaming-data-from-server-functions/package.json,tsconfig.json,vite.config.tsexamples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts,router.tsx@tanstack/solid-routerand@tanstack/solid-start. Added router factory functiongetRouterwith default preload, error, and not-found components.examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx,index.tsxexamples/solid/start-streaming-data-from-server-functions/src/styles/app.cssSequence Diagram(s)#
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~20 minutes
routeTree.gen.ts).Areas requiring attention:
routeTree.gen.tsmodule augmentations are correctly aligned with@tanstack/solid-routerand@tanstack/solid-startAPI contracts.Possibly related PRs#
routeTree.gen.tsand router typings augmentation for@tanstack/solid-start.docs/start/config.jsonto update the Solid examples list, same configuration file as this PR.Suggested reviewers#
Poem#
Pre-merge checks and finishing touches#
❌ Failed checks (1 warning)
@coderabbitai generate docstringsto improve docstring coverage.✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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