Skip to content

Conversation

@tannerlinsley
Copy link
Collaborator

@tannerlinsley tannerlinsley commented Oct 18, 2025

Add new guide pages for React and Solid Start to address common hydration errors, especially those related to locale and time zone mismatches.


Open in Cursor Open in Web

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guides for handling hydration errors in React and Solid frameworks, covering multiple strategies with practical code examples and best practices.
    • Updated navigation menu to surface the new hydration error documentation resources.

Co-authored-by: tannerlinsley <tannerlinsley@gmail.com>
@cursor
Copy link

cursor bot commented Oct 18, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 18, 2025

Walkthrough

Adds documentation guides for handling hydration errors in React and Solid frameworks. Includes new navigation entries in the documentation config and two comprehensive guides explaining hydration mismatch causes, five mitigation strategies, code examples, and best practices for each framework.

Changes

Cohort / File(s) Change Summary
Navigation Configuration
docs/start/config.json
Adds "Hydration Errors" navigation entries under Guides sections for both React and Solid frameworks, positioned after "Server Routes" items.
React Framework Documentation
docs/start/framework/react/guide/hydration-errors.md
New guide document covering hydration error causes, five strategies (deterministic matching, client-reported environment, ClientOnly rendering, selective SSR, suppressHydrationWarning), TypeScript/TSX code examples, and best practices checklist.
Solid Framework Documentation
docs/start/framework/solid/guide/hydration-errors.md
New guide document covering hydration error causes, five strategies (deterministic matching, client-reported environment, ClientOnly/NoHydration rendering, selective SSR, suppression), code examples, and best practices checklist tailored for Solid.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • TanStack/router#5441: Reorganizes documentation navigation by moving items into a Guides section, which this PR extends by adding Hydration Errors entries within those Guides.

Suggested reviewers

  • schiller-manuel
  • brenelz
  • birkskyum

Poem

🐰 When server and client don't align,
Hydration hiccups make spirits decline!
But fear not, dear docs now guide the way,
With strategies five to save the day! ✨
React and Solid, both now shine bright,
With hydration wisdom—everything's right! 🌊

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 "Add hydration error guide page" is directly related to the main changes in the pull request. The changeset adds comprehensive documentation guides addressing hydration errors, specifically creating two new guide pages (one for React and one for Solid) and updating the navigation configuration to surface them. The title accurately captures the core purpose of the changes—adding hydration error documentation. While the title uses singular "page" when the PR technically adds two pages, this is a minor imprecision that does not mislead about the fundamental nature of the change. The title is concise, clear, and sufficient for a teammate to quickly understand the PR's intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/add-hydration-error-guide-page-baad

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 18, 2025
@nx-cloud
Copy link

nx-cloud bot commented Oct 18, 2025

View your CI Pipeline Execution ↗ for commit 26e8e0a

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

☁️ Nx Cloud last updated this comment at 2025-10-18 22:04:38 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 18, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: 26e8e0a

@tannerlinsley tannerlinsley marked this pull request as ready for review October 19, 2025 01:16
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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4693e0e and 26e8e0a.

📒 Files selected for processing (3)
  • docs/start/config.json (2 hunks)
  • docs/start/framework/react/guide/hydration-errors.md (1 hunks)
  • docs/start/framework/solid/guide/hydration-errors.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • docs/start/config.json
  • docs/start/framework/solid/guide/hydration-errors.md
  • docs/start/framework/react/guide/hydration-errors.md
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/guide/hydration-errors.md
  • docs/start/framework/react/guide/hydration-errors.md
🔇 Additional comments (2)
docs/start/config.json (1)

104-107: Navigation entries properly structured and placed.

Both React and Solid navigation entries follow the consistent naming convention and are positioned logically after Server Routes. The paths align with the new documentation files being added.

Also applies to: 197-200

docs/start/framework/solid/guide/hydration-errors.md (1)

105-106: Strategy 5 intentionally minimal for Solid.

The "last resort" strategy appropriately omits Solid-specific suppression syntax (unlike React's suppressHydrationWarning), correctly emphasizing that Solid doesn't offer a built-in suppression API and alternative strategies should be used instead.

- **Use Selective SSR** when server HTML cannot be stable
- **Avoid blind suppression**; use `suppressHydrationWarning` sparingly

See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
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 doc link format to comply with coding guidelines.

The "See also" links use relative file paths (../execution-model.md) instead of doc-friendly links relative to the docs folder. Per the coding guidelines, use paths like ./guide/execution-model (without .md extension).

Apply this diff:

-See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
+See also: [Execution Model](./execution-model), [Code Execution Patterns](./code-execution-patterns), [Selective SSR](./selective-ssr), [Server Functions](./server-functions)
📝 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
See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
See also: [Execution Model](./execution-model), [Code Execution Patterns](./code-execution-patterns), [Selective SSR](./selective-ssr), [Server Functions](./server-functions)
🤖 Prompt for AI Agents
In docs/start/framework/react/guide/hydration-errors.md around line 122, the
"See also" links use relative file paths with .md and parent directory traversal
(e.g. ../execution-model.md); update each link to the doc-friendly form without
the .md and using a docs-relative path (for example replace
../execution-model.md with ./guide/execution-model,
../code-execution-patterns.md with ./guide/code-execution-patterns,
../selective-ssr.md with ./guide/selective-ssr, and ../server-functions.md with
./guide/server-functions) so links conform to the coding guidelines.

- **Use `<ClientOnly>`/`<NoHydration>`** for inherently dynamic UI
- **Use Selective SSR** when server HTML cannot be stable

See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
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 doc link format to comply with coding guidelines.

The "See also" links use relative file paths (../execution-model.md) instead of doc-friendly links relative to the docs folder. Per the coding guidelines, use paths like ./guide/execution-model (without .md extension). This should match the format applied to the React version of this guide.

Apply this diff:

-See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
+See also: [Execution Model](./execution-model), [Code Execution Patterns](./code-execution-patterns), [Selective SSR](./selective-ssr), [Server Functions](./server-functions)
📝 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
See also: [Execution Model](../execution-model.md), [Code Execution Patterns](../code-execution-patterns.md), [Selective SSR](../selective-ssr.md), [Server Functions](../server-functions.md)
See also: [Execution Model](./execution-model), [Code Execution Patterns](./code-execution-patterns), [Selective SSR](./selective-ssr), [Server Functions](./server-functions)
🤖 Prompt for AI Agents
In docs/start/framework/solid/guide/hydration-errors.md around line 114, the
"See also" links use relative file paths with .md and parent directories; update
each link to the docs-friendly path format (no .md, paths relative to the docs
folder) — replace ../execution-model.md with ./guide/execution-model,
../code-execution-patterns.md with ./guide/code-execution-patterns,
../selective-ssr.md with ./guide/selective-ssr, and ../server-functions.md with
./guide/server-functions so the link format matches the React guide.

@tannerlinsley tannerlinsley merged commit e004400 into main Oct 20, 2025
6 checks passed
@tannerlinsley tannerlinsley deleted the cursor/add-hydration-error-guide-page-baad branch October 20, 2025 18:00
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.

3 participants