Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 12, 2025

Summary by CodeRabbit

Documentation

  • Added a new Kitchen Sink (code-based) example for the Solid.js framework demonstrating routing, nested layouts, data loading, mutation handling, user authentication flows, filtering, sorting, and state management patterns.

@github-actions github-actions bot added the documentation Everything documentation related label Nov 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

This PR adds a new code-based Solid.js kitchen-sink example project to the TanStack Router repository. The addition includes project scaffolding, configuration files, an HTML entry point, and comprehensive application code demonstrating TanStack Router features with Solid.js, including route definitions, data loading, mutations, and authentication flows.

Changes

Cohort / File(s) Summary
Configuration & Documentation
docs/router/config.json
Registers new Kitchen Sink code-based example for Solid framework, inserted between SSR streaming and file-based variants
Project Setup
examples/solid/kitchen-sink/{.gitignore,.vscode/settings.json,README.md}
Adds standard project boilerplate: gitignore rules for generated/local files, VSCode workspace settings to exclude routeTree.gen.ts, and basic setup instructions
Build & Runtime Configuration
examples/solid/kitchen-sink/{package.json,postcss.config.mjs,tsconfig.json,vite.config.js}
Defines project metadata, npm scripts, dependencies (TanStack Router, Tailwind CSS, Solid.js), PostCSS/Tailwind integration, TypeScript strict mode, and Vite + Solid plugin configuration
HTML Entry Point
examples/solid/kitchen-sink/index.html
Minimal HTML5 bootstrap for Vite app with root div and module script pointing to /src/main.tsx
Application Core
examples/solid/kitchen-sink/src/main.tsx
Comprehensive Solid.js + TanStack Router example with full route tree (dashboards, invoices, users, auth), data loaders, nested layouts, mutations, auth context, URL search parameter persistence, and test harness UI for configurable loading/action delays
Data & Utilities
examples/solid/kitchen-sink/src/{mockTodos.ts,useMutation.tsx,utils.tsx,styles.css,Expensive.tsx}
Mock data models (Invoice, User) with async fetch/update utilities; generic useMutation hook for handling async operations; helper functions for configurable delays and array shuffling; Tailwind CSS base styling with light/dark mode support; simple code-split component placeholder

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • main.tsx requires careful review for routing logic, data loader implementations, auth flow, and mutation handling
  • mockTodos.ts defines multiple data types and async utilities with error injection logic that should be validated
  • Configuration files and boilerplate are straightforward but numerous; verify consistency across build tooling setup
  • Ensure imports and dependencies align with package.json specifications

Possibly related PRs

Poem

🐰 A kitchen sink in Solid hue,
With routes and mutations, shiny new!
Data flows like carrots in a row,
Auth and forms and state to know,
Whisker-tested, hopping true!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding a kitchen-sink example for Solid Router, which is the primary objective of this pull request containing the new example files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs(solid-router)--kitchensink-example

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.

@nx-cloud
Copy link

nx-cloud bot commented Nov 12, 2025

View your CI Pipeline Execution ↗ for commit 5cef952

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

☁️ Nx Cloud last updated this comment at 2025-11-12 18:32:53 UTC

@birkskyum birkskyum force-pushed the docs(solid-router)--kitchensink-example branch from f960dbf to 5cef952 Compare November 12, 2025 18:30
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: 5cef952

@birkskyum birkskyum merged commit 6805420 into main Nov 12, 2025
5 checks passed
@birkskyum birkskyum deleted the docs(solid-router)--kitchensink-example branch November 12, 2025 18:34
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: 4

🧹 Nitpick comments (6)
examples/solid/kitchen-sink/src/Expensive.tsx (1)

3-3: Template literal unnecessary for static string.

The backticks can be replaced with regular quotes since the class name is static.

Apply this diff:

-    <div class={`p-2`}>
+    <div class="p-2">
examples/solid/kitchen-sink/src/useMutation.tsx (1)

3-13: Consider adding explicit return type annotation.

While TypeScript infers the return type, adding an explicit annotation improves API discoverability and catches unintended changes.

Example:

export function useMutation<TVariables, TData, TError = Error>(opts: {
  fn: (variables: TVariables) => Promise<TData>
  onSuccess?: (ctx: { data: TData }) => void | Promise<void>
}): {
  status: 'idle' | 'pending' | 'success' | 'error'
  variables: TVariables | undefined
  submittedAt: number | undefined
  mutate: (variables: TVariables) => Promise<TData | undefined>
  error: TError | undefined
  data: TData | undefined
} {
  // ... implementation
}
examples/solid/kitchen-sink/src/mockTodos.ts (4)

44-45: Avoid null assertions for module-level state.

Using null! assertions bypasses TypeScript's type safety. While the code works because all public functions call ensureInvoices()/ensureUsers() first, this pattern is fragile and could cause runtime errors if the code evolves.

Consider initializing with empty arrays instead:

-let invoices: Array<Invoice> = null!
-let users: Array<User> = null!
+let invoices: Array<Invoice> = []
+let users: Array<User> = []

Then update the ensure functions to check for empty arrays:

 const ensureInvoices = async () => {
-  if (!invoicesPromise) {
+  if (invoices.length === 0 && !invoicesPromise) {
     invoicesPromise = Promise.resolve().then(async () => {

126-127: Remove unnecessary optional chaining.

The second optional chaining operator (?.) after toLocaleLowerCase() is unnecessary because toLocaleLowerCase() always returns a string, never null or undefined. The eslint-disable comment is suppressing a valid warning.

-      // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
-      if (updatedInvoice.title?.toLocaleLowerCase()?.includes('error')) {
+      if (updatedInvoice.title?.toLowerCase()?.includes('error')) {

Note: Also consider using toLowerCase() instead of toLocaleLowerCase() for consistency with fetchUsers (line 149), unless locale-specific behavior is required.


133-133: Add non-null assertion for type safety.

TypeScript cannot infer that the invoice exists here because the error was thrown inside the produce callback. The find could theoretically return undefined, causing a type mismatch.

-    return invoices.find((d) => d.id === id)
+    return invoices.find((d) => d.id === id)!

164-168: Note: Inconsistent error handling pattern.

fetchUserById returns User | undefined when a user is not found, while fetchInvoiceById (line 85) throws an error. This inconsistency may be intentional to demonstrate different error handling patterns in the kitchen-sink example, but it's worth noting for consistency.

If consistency is preferred, consider either approach:

  • Make both throw when not found, or
  • Make both return T | undefined
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f581aa9 and 5cef952.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • docs/router/config.json (1 hunks)
  • examples/solid/kitchen-sink/.gitignore (1 hunks)
  • examples/solid/kitchen-sink/.vscode/settings.json (1 hunks)
  • examples/solid/kitchen-sink/README.md (1 hunks)
  • examples/solid/kitchen-sink/index.html (1 hunks)
  • examples/solid/kitchen-sink/package.json (1 hunks)
  • examples/solid/kitchen-sink/postcss.config.mjs (1 hunks)
  • examples/solid/kitchen-sink/src/Expensive.tsx (1 hunks)
  • examples/solid/kitchen-sink/src/main.tsx (1 hunks)
  • examples/solid/kitchen-sink/src/mockTodos.ts (1 hunks)
  • examples/solid/kitchen-sink/src/styles.css (1 hunks)
  • examples/solid/kitchen-sink/src/useMutation.tsx (1 hunks)
  • examples/solid/kitchen-sink/src/utils.tsx (1 hunks)
  • examples/solid/kitchen-sink/tsconfig.json (1 hunks)
  • examples/solid/kitchen-sink/vite.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep example applications under examples/react/ and examples/solid/

Files:

  • examples/solid/kitchen-sink/src/styles.css
  • examples/solid/kitchen-sink/index.html
  • examples/solid/kitchen-sink/src/main.tsx
  • examples/solid/kitchen-sink/vite.config.js
  • examples/solid/kitchen-sink/README.md
  • examples/solid/kitchen-sink/src/useMutation.tsx
  • examples/solid/kitchen-sink/postcss.config.mjs
  • examples/solid/kitchen-sink/src/mockTodos.ts
  • examples/solid/kitchen-sink/src/utils.tsx
  • examples/solid/kitchen-sink/tsconfig.json
  • examples/solid/kitchen-sink/package.json
  • examples/solid/kitchen-sink/src/Expensive.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • examples/solid/kitchen-sink/src/main.tsx
  • examples/solid/kitchen-sink/src/useMutation.tsx
  • examples/solid/kitchen-sink/src/mockTodos.ts
  • examples/solid/kitchen-sink/src/utils.tsx
  • examples/solid/kitchen-sink/src/Expensive.tsx
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • docs/router/config.json
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • examples/solid/kitchen-sink/package.json
🧠 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 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
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/kitchen-sink/src/main.tsx
  • examples/solid/kitchen-sink/tsconfig.json
  • examples/solid/kitchen-sink/package.json
📚 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/kitchen-sink/src/main.tsx
  • examples/solid/kitchen-sink/.vscode/settings.json
📚 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 docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/

Applied to files:

  • docs/router/config.json
📚 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 examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/

Applied to files:

  • docs/router/config.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/kitchen-sink/.vscode/settings.json
📚 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 codebase

Applied to files:

  • examples/solid/kitchen-sink/tsconfig.json
📚 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/kitchen-sink/package.json
📚 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 directories

Applied to files:

  • examples/solid/kitchen-sink/package.json
🧬 Code graph analysis (2)
examples/solid/kitchen-sink/src/main.tsx (2)
examples/solid/kitchen-sink/src/mockTodos.ts (7)
  • fetchInvoices (76-78)
  • postInvoice (92-114)
  • Invoice (8-12)
  • fetchInvoiceById (80-90)
  • patchInvoice (116-135)
  • fetchUsers (139-162)
  • fetchUserById (164-168)
examples/solid/kitchen-sink/src/useMutation.tsx (2)
  • useMutation (3-51)
  • error (44-46)
examples/solid/kitchen-sink/src/mockTodos.ts (1)
examples/solid/kitchen-sink/src/utils.tsx (3)
  • loaderDelayFn (1-11)
  • actionDelayFn (13-19)
  • shuffle (21-33)
🪛 Biome (2.1.2)
examples/solid/kitchen-sink/src/main.tsx

[error] 539-539: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

⏰ 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
🔇 Additional comments (9)
examples/solid/kitchen-sink/.gitignore (1)

1-5: LGTM!

Standard gitignore patterns appropriate for a Vite-based Solid.js project.

examples/solid/kitchen-sink/README.md (1)

1-6: LGTM!

Clear and concise run instructions for the example.

examples/solid/kitchen-sink/.vscode/settings.json (1)

1-11: LGTM!

Appropriate VSCode settings to exclude the autogenerated route tree file from watching, searching, and editing. Based on learnings.

examples/solid/kitchen-sink/tsconfig.json (1)

1-13: LGTM!

TypeScript configuration properly enables strict mode and is correctly configured for Solid.js. As per coding guidelines.

examples/solid/kitchen-sink/vite.config.js (1)

1-7: LGTM!

Standard Vite configuration with the Solid.js plugin correctly applied.

examples/solid/kitchen-sink/postcss.config.mjs (1)

1-5: LGTM!

Standard PostCSS configuration for Tailwind CSS v4 using the new @tailwindcss/postcss plugin.

examples/solid/kitchen-sink/index.html (1)

1-11: HTML shell looks good.

The minimal Vite entry point aligns with the other Solid examples—no issues spotted.

examples/solid/kitchen-sink/src/styles.css (1)

1-21: Tailwind base layer setup looks solid.

The import and base styles follow the v4 patterns and match the rest of the example’s design—looks good.

examples/solid/kitchen-sink/src/utils.tsx (1)

1-33: Utility helpers look correct.

The delay wrappers and Fisher–Yates shuffle match their usage in the loaders/actions—looks good to me.

Comment on lines +637 to +640
{
"label": "Kitchen Sink (code-based)",
"to": "framework/solid/examples/kitchen-sink"
},
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 matching docs page before merging.

This new nav item points to framework/solid/examples/kitchen-sink, but I don’t see an accompanying page in this PR. Without it, the menu link will 404 on the site. Please add the corresponding MDX page (or adjust the link if it already exists elsewhere) so the navigation remains functional.

🤖 Prompt for AI Agents
In docs/router/config.json around lines 637 to 640, the new navigation entry
"framework/solid/examples/kitchen-sink" points to a page that isn't present in
this PR, causing a 404; add a corresponding MDX page at
docs/framework/solid/examples/kitchen-sink.mdx (or adjust the "to" path to an
existing page) containing the Kitchen Sink documentation and frontmatter so the
link resolves, then ensure the file is exported/registered by the docs build
(and update any index or sidebar if your system requires explicit inclusion).

Comment on lines +12 to +20
"@tailwindcss/postcss": "^4.1.15",
"@tanstack/solid-router": "^1.135.2",
"@tanstack/solid-router-devtools": "^1.135.2",
"immer": "^10.1.1",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwindcss": "^4.1.15",
"zod": "^3.24.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Switch local TanStack deps to workspace:*.

Per the repo convention, internal packages should resolve through the workspace to pick up local changes. Please update both router packages accordingly.

As per coding guidelines
Apply this diff:

-    "@tanstack/solid-router": "^1.135.2",
-    "@tanstack/solid-router-devtools": "^1.135.2",
+    "@tanstack/solid-router": "workspace:*",
+    "@tanstack/solid-router-devtools": "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 change
"@tailwindcss/postcss": "^4.1.15",
"@tanstack/solid-router": "^1.135.2",
"@tanstack/solid-router-devtools": "^1.135.2",
"immer": "^10.1.1",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwindcss": "^4.1.15",
"zod": "^3.24.2"
"@tailwindcss/postcss": "^4.1.15",
"@tanstack/solid-router": "workspace:*",
"@tanstack/solid-router-devtools": "workspace:*",
"immer": "^10.1.1",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwindcss": "^4.1.15",
"zod": "^3.24.2"
🤖 Prompt for AI Agents
In examples/solid/kitchen-sink/package.json around lines 12 to 20 the two
TanStack packages are declared with fixed versions; update
"@tanstack/solid-router" and "@tanstack/solid-router-devtools" to use the
workspace protocol so they resolve to local packages by replacing their version
strings with "workspace:*" (leave all other dependencies unchanged).

Comment on lines +538 to +540
{['name', 'id', 'email'].map((d) => {
return <option value={d} children={d} />
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Render <option> content directly.

Biome flags children={...} on JSX elements as an error here. Switching to normal JSX children keeps the code clear and resolves the lint failure.

Apply this diff:

-            {['name', 'id', 'email'].map((d) => {
-              return <option value={d} children={d} />
-            })}
+            {['name', 'id', 'email'].map((d) => {
+              return <option value={d}>{d}</option>
+            })}
📝 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
{['name', 'id', 'email'].map((d) => {
return <option value={d} children={d} />
})}
{['name', 'id', 'email'].map((d) => {
return <option value={d}>{d}</option>
})}
🧰 Tools
🪛 Biome (2.1.2)

[error] 539-539: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

🤖 Prompt for AI Agents
In examples/solid/kitchen-sink/src/main.tsx around lines 538 to 540, the mapped
<option> elements are using the JSX prop children={d}, which Biome flags as an
error; change each option to render its content as normal JSX children (e.g.,
<option value={d}>{d}</option>) when returning from the map to resolve the lint
failure.

Comment on lines +27 to +30
} catch (err: any) {
setStatus('error')
setError(() => err)
}
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

Avoid any type in error handling.

Using any type in the catch block violates TypeScript strict mode best practices and the coding guideline for extensive type safety. Use unknown with proper type handling or cast to the error type.

As per coding guidelines.

Apply this diff:

-    } catch (err: any) {
+    } catch (err) {
       setStatus('error')
-      setError(() => err)
+      setError(() => err as TError)
     }
📝 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
} catch (err: any) {
setStatus('error')
setError(() => err)
}
} catch (err) {
setStatus('error')
setError(() => err as TError)
}
🤖 Prompt for AI Agents
In examples/solid/kitchen-sink/src/useMutation.tsx around lines 27 to 30, the
catch block types the error as `any`; change it to `unknown` and normalize it
before calling setError. Replace `catch (err: any)` with `catch (err: unknown)`
and update setError to accept a proper Error instance (e.g. use a short type
guard: if (err instanceof Error) return err; else return new
Error(String(err))). Keep setStatus('error') as is.

roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
* docs(solid-router): kitchensink example

* add listing

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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