-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: change hydration target to document.body in custom client.tsx for Solid #5091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUpdated a documentation snippet in docs/start/framework/solid/learn-the-basics.md, changing the hydration target from document to document.body in the client hydration example. No code or public API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
View your CI Pipeline Execution ↗ for commit 754805b
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-plugin
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-plugin
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-server
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/start/framework/solid/learn-the-basics.md (2)
88-88: Correct hydration root; fixes client navigation breakageHydrating
document.bodymatches the server-rendered root and prevents full-document mismatch that can push navigations to the server. Looks good to me.Consider adding a brief callout below the snippet explaining that hydrating
documentcan break client navigation when using a customclient.tsx.hydrate(() => <StartClient router={router} />, document.body)
+> [!IMPORTANT]
+> Hydrate todocument.body. Usingdocumentcan cause a full-document hydration mismatch with a customclient.tsx, resulting in broken client-side navigation.--- `100-129`: **Render HeadContent and Scripts in the root example (docs consistency)** The snippet imports `HeadContent` and `Scripts` but doesn’t render them, while the text later calls out `Scripts`. Suggest updating the example so it matches the guidance. If Start’s default handlers already inject these for you, either clarify that or remove the imports. ```diff function RootComponent() { - return <Outlet /> + return ( + <> + <HeadContent /> + <Outlet /> + <Scripts /> + </> + ) }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
docs/start/framework/solid/learn-the-basics.md(1 hunks)
⏰ 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
Fixes #5085
Summary by CodeRabbit